Table of Contents

Search

  1. Preface
  2. Salesforce Managed Package
  3. Running a Guide within a Salesforce Organization
  4. Techniques
  5. Customizing Salesforce
  6. Mobile Guides
  7. Meeting Follow-up Wizards
  8. Controlling Who Sees Guides
  9. Launching a Guide
  10. Guide Execution Reports

Salesforce and Application Integration

Salesforce and Application Integration

Custom Search Services

Custom Search Services

You can implement search services as Apex classes. Search services use the same interface and discovery mechanisms as step services, with the following differences:
  • Set the service type to search in AeServiceDescription:
    AeServiceDescription.serviceType = 'search';
  • There should be one output parameter, Search Results, that returns the data.
  • To return a valuelist, the invoke() method should return name/value pairs representing the name/id of the objects returned.
The following example returns a valuelist of account references filtered by OwnerId:
List<Account> accountList = [SELECT Name, id FROM Account WHERE OwnerId =:userRef LIMIT 20]; for (Account account: accountList) { // For a search service, return name/id as parameters response.addParameter(account.Name, account.Id); }

0 COMMENTS

We’d like to hear from you!