You are here:
InsCensusService:createAccounts
Use this service to create Person Accounts for the members in the given census.
Class:
InsCensusService
Method:
createAccounts
Person Accounts must be enabled in the org when using this service.
How it Works
To create person accounts for the members in the given census, this service:
-
Uses the
censusIdto retrieve the list ofGroupCensusMember__crecords. -
Then it creates a Person Account for each
censusMember. -
Creates an ACR (AccountContactRelation) record.
NoteACR.accountId = groupAccountId
ACR.ContactId = PersonContactId of the created Person Account
-
Updates the
AccountId__candContactId__cfields of the census member. -
Sets
GroupCensusMember__c.AccountId__cas the Id of the newly created Person Account andGroupCensusMember__c.ContactId__cas the correspondingPersonContactId.
Remote Options
Remote Option |
Description |
|---|---|
|
Required. Id of census to retrieve the group members. |
|
Optional. Name of the person account record type to be associated with the created person accounts. Note
If the value isn’t passed, it defaults to "Person Account." |
|
Number of records to be processed per batch job. Note
Supported only for small and medium groups (up to 900 records which includes both primary members and dependents). |
|
Number of records to be processed per asynchronous Apex job. This parameter determines how many apex jobs are instantiated, given the number of records. Note
Salesforce allows a maximum five apex jobs to run in parallel. |
|
Notifies the community admin to create or configure the community users. |
|
Comma-delimited field names. This option checks for duplicate fields. Example: FirstName, LastName, BirthDate If this option isn’t used, all the duplicate fields are ignored. |

