Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
GetAccountsAndContacts Class
Namespace
Special Access Rules
Case Referral and Complaints Management Access permission sets are required to use this Apex class. Person Accounts must be enabled to retrieve the person accounts.
Usage
The GetAccountsAndContacts class is implemented in the Case Participants section of the Create a Referral Case page in OmniScript.
Specify the Apex class name in the Remote Actions section of the OmniScript page. A Remote Action calls the specified Apex class and its method to retrieve the accounts and contacts.
This screenshot shows how to specify the Apex class name in Remote Actions:
GetAccountsAndContacts Methods
The following are methods for GetAccountsAndContacts.
invokeMethod(methodName, input, output, options)
Signature
public static Boolean invokeMethod(String methodName, Map<String,ANY> input, Map<String,ANY> output, Map<String,ANY> options)
Parameters
-
methodName:
Type: String
Reserved for future use.
-
input:
Type: Map<String,ANY>
Reserved for future use.
-
output:
Type: Map<String,ANY>
Contains the list of person accounts, business accounts, and contacts that are returned by the method.
-
options:
Type: Map<String,ANY>
Contains partial or full search terms to find for the matched person accounts, business accounts, and contacts.
Valid search terms for accounts and contacts:
- BusinessAccount—Name and ShippingCity
- Contact—FirstName, LastName, and MailingCity
- PersonAccount—FirstName, LastName, and ShippingCity
Return Value
Type: Boolean
Returns a Boolean value indicating whether the method returned the list of accounts and contacts (true) or not (false).