GetAccountsAndContacts Class

This class contains a method that returns a list of the person accounts, business accounts, and contacts.

Namespace

PublicSectrSltn

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:

A representation of Remote Actions in OmniScript in your Salesforce org.

GetAccountsAndContacts Methods

The following are methods for GetAccountsAndContacts.

invokeMethod(methodName, input, output, options)

Returns a list of person accounts, business accounts, and contacts based on the specified first name, last name, and city. The method performs a partial or full search based on the input to return the list that matches the criteria.

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).