WEBINAR RECORDING: How to Raise More Money Without Burning Out with Special Guest Presenter Beth Kanter. Watch >>

Filtering results by logged in user's Contact record or Account record

created

If your site has a password-protected area and user accounts are connected to a Contact record in your Salesforce instance, you have the ability to filter results of a Directories page based on a logged in user's Contact record or Account record.

This option for filtering records of a given object can apply to 1) the Contacts object itself; 2) the Accounts object itself; or 3) any object that is related to the Contact or Account object

Filtering by Contact ID

To filter Directories results by Contact ID of the logged in user:

  • Go to Components > Salesforce Dashboard > Directories
  • Click Form Manager
  • Open the form containing the records to which you wish to grant edit access
  • On the Search Form tab, click Add Salesforce Element
  • Select the Contact ID from the Salesforce Field drop down list
  • For Hidden, choose Yes
  • For Default Value, insert the following variable, matching the exact casing:

    {$ContactId}

  • Click Save

jsf-search-contact-filter.png

Filtering by Account ID

To filter Directories results by Account ID of the logged in user:

  • Go to Components > Salesforce Dashboard > Directories
  • Click Form Manager
  • Open the form containing the records to which you wish to grant edit access
  • On the Search Form tab, click Add Salesforce Element
  • Select the Account ID from the Saleforce Field drop down list
  • For Hidden, choose Yes
  • For Default Value, insert the following variable, matching the exact casing:

    {$AccountId}

  • Click Save

In addition to the ContactId and AccountId, you also have the ability to search and filter by any field value on the Contact record of the logged in user. For a list of all variables available in Directories, refer to Variables available for a Directories Default Value.

Have more questions? Submit a request
Article is closed for comments.