serviceCtx.put("areaCode", telNumber.substring(0, 3));
serviceCtx.put("contactNumber", telNumber.substring(3));
}
}
}
OrganizationalIdentity oid = contact.getOrganizationalIdentity();
// Useful when creating a contact with more than OOTB
if (!isGroup) {
serviceCtx.put("personalTitle", oid.getTitle());
}
// Needed when creating an account (a PartyGroup)
if (isGroup) {
//serviceCtx.put("partyRole", oid.getRole()); // not used yet,maybe useful later
if (oid.hasOrganization()) {
Organization org = oid.getOrganization();
serviceCtx.put("groupName", org.getName());
}
}
GenericValue userLogin = (GenericValue) context.get("userLogin");