String error = UtilProperties.getMessage(resourceMarketing, "MarketingContactListNotFound", input, locale);
return ServiceUtil.returnError(error);
}
// perform actions as the system user
GenericValue userLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", "system"));
// associate the email with anonymous user TODO: do we need a custom contact mech purpose type, say MARKETING_EMAIL?
input = UtilMisc.toMap("userLogin", userLogin, "emailAddress", email, "partyId", "_NA_", "fromDate", fromDate, "contactMechPurposeTypeId", "OTHER_EMAIL");
Map<String, Object> serviceResults = dispatcher.runSync("createPartyEmailAddress", input);
if (ServiceUtil.isError(serviceResults)) {