EDA supports three distinct types of Accounts:
Salesforce requires the use of Administrative Accounts with EDA. For more information, please refer to this Salesforce document - Education Data Architecture (EDA) Documentation. TargetX traditionally utilizes the organizational account model.
Institutions that are looking to utilize the Administrative account model will need to do the following:
Update Account via imports
EDA's Administrative Account creation does not work when users self-register on a Salesforce community. TargetX's Communities package which was updated as part of the Summer '17 Release allows institutions to create an Administrative Account (named 'Lastname Administrative Account') and assign that Account to the new Contact created at registration. Existing Community user accounts will remain unchanged.
Communities is an unmanaged package. To access this functionality, you need to update the TX_CommunitiesSelfRegController.
Note: This update can only occur within sandbox, and then perform a change set to Production to save those changes.
For additional information, please see: Deploying from Sandbox with Change Sets.
Contact[] cs =
// Uncomment the following line if you want to use HEDA's administrative accounts. // NOTE: You will also need to make sure you have some way for account to be set to an owner with a role // on creation. By default, accounts will be created by the guest user and fail. //if(cs.size() == 0 && !hasDuplicateUser(email)) cs = insertContactFirst() ;
if(cs.size() == 0 && !hasDuplicateUser(email)) cs = insertContactFirst() ;
private Contact[] insertContactFirst() { Contact c = new Contact() ; c.FirstName = firstName ; c.LastName = lastName ; c.Email = email ; insert c ; return [SELECT Id, AccountId, Account.OwnerId, Account.Owner.UserRoleId FROM Contact WHERE Id = :c.Id] ; }
Note: You must ensure you have some way for accounts to be set to an owner with a role.