Case: Using Create Formula in Salesforce

This case illustrates how to use Create Formula to limit access control to a certain profile IDs and role IDs.

Data

Profile ID: 00e1r0000016QkeEED

Role ID: 00E6M000001gcyIXYZ, 00E6M000001gcvdMAB

Record Types: Product_support and problem

Goals

  • Ensure that only the user with the given profile ID or any of the role ID can view the results from the record type "Product_support."

  • Exclude all canceled cases from the search results.

Solution

The formula is:

Copy

Customize Results on Salesforce

AND(
    AND('recordType')
    OR('profileID','roleID')
    NOT('status('cancelled')')
)

This formula excludes all search results with "Canceled Status." 

The results from the given "recordType" are shown only to the users with the given "profileID" and "roleID".