Fixed: Service calls of "createPartyContactMech" now include the needed contactMechTypeId
This was broken by where, as well explained at "createPartyContactMech Service has been changed to expect an OUT contactMechTypeId paramter and the call on this end has not been modified."
@@ -2595,6 +2595,7 @@ public class PartyServices {
if (currentContactMechPurposeTypeId != null && ("TELECOM_NUMBER".equals(currentContactMechTypeId)
|| "POSTAL_ADDRESS".equals(currentContactMechTypeId) || "EMAIL_ADDRESS".equals(currentContactMechTypeId))) {
partyContactMechPurpose.put("contactMechPurposeTypeId", currentContactMechPurposeTypeId);
+ partyContactMechPurpose.put("contactMechTypeId", currentContactMechTypeId);
partyContactMechPurposeChanged = (lastContactMechPurposeTypeId == null
|| !lastContactMechPurposeTypeId.equals(currentContactMechPurposeTypeId)) && !telecomNumberChanged
&& !postalAddressChanged && !emailAddressChanged;
@@ -2617,7 +2618,7 @@ public class PartyServices {
currentContactMechPurposeTypeId = "GENERAL_LOCATION";
}
Map<String, Object> serviceResult = dispatcher.runSync("createPartyContactMech", UtilMisc.toMap("partyId", newPartyId,
- "contactMechId", newContactMechId, "contactMechPurposeTypeId", currentContactMechPurposeTypeId,
+ "contactMechId", newContactMechId, "contactMechTypeId", currentContactMechTypeId, "contactMechPurposeTypeId", currentContactMechPurposeTypeId,
"userLogin", userLogin));
if (ServiceUtil.isError(serviceResult)) {
return ServiceUtil.returnError(ServiceUtil.getErrorMessage(serviceResult));
@@ -2634,7 +2635,7 @@ public class PartyServices {
currentContactMechPurposeTypeId = "PHONE_WORK";
}
Map<String, Object> resultMap = dispatcher.runSync("createPartyContactMech", UtilMisc.toMap("partyId", newPartyId,
- "contactMechId", newContactMechId, "contactMechPurposeTypeId", currentContactMechPurposeTypeId,
+ "contactMechId", newContactMechId, "contactMechTypeId", currentContactMechTypeId, "contactMechPurposeTypeId", currentContactMechPurposeTypeId,
"userLogin", userLogin));
if (ServiceUtil.isError(resultMap)) {
return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
@@ -2651,7 +2652,7 @@ public class PartyServices {
currentContactMechPurposeTypeId = "PRIMARY_EMAIL";
}
Map<String, Object> resultMap = dispatcher.runSync("createPartyContactMech", UtilMisc.toMap("partyId", newPartyId,
- "contactMechId", newContactMechId, "contactMechPurposeTypeId", currentContactMechPurposeTypeId, "userLogin",
+ "contactMechId", newContactMechId, "contactMechTypeId", currentContactMechTypeId, "contactMechPurposeTypeId", currentContactMechPurposeTypeId, "userLogin",
userLogin));
if (ServiceUtil.isError(resultMap)) {
return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
