Loading
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Dynamic Variables for SOQL Filter Conditions

          Dynamic Variables for SOQL Filter Conditions

          Use dynamic variables in the SOQL filter condition field to generate metadata filtering data customized to each user. Life Sciences Cloud replaces these variables at runtime with the appropriate user or territory values, enabling dedicated data access without hardcoding values.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise and Unlimited Editions with Life Sciences Cloud, Life Sciences Cloud for Customer Engagement Add-on license, and the Life Sciences Customer Engagement managed package.

          Here's the list of all the supported dynamic variables.

          Dynamic Variable Purpose Where to Use Example
          {USER.Territory} Download data using the territory name. The variable is replaced by the user’s territory name dynamically. Any object Territory2.Name = ‘{USER.TERRITORY}’
          {USER.ID} Downloads data using the user ID. The variable is replaced by the logged-in user’s ID dynamically. Any object CreatedById = ‘{USER.ID}’
          {USER.TERRITORYID} Downloads data using territory ID. The variable is replaced by the user’s territory ID dynamically. Any object Territory2Id = ‘{USER.TERRITORYID}’
          {OT2A.OBJ.IDS} Downloads accounts based on territory. The mobile app first downloads Object Territory to OT2A records, then retrieves only the account IDs shared with the user’s territory. Account object only AccountId IN ({OT2A.OBJ.IDS})
          {Account.IDS}

          Ensures that related records are downloaded only for accounts already present in the mobile app. Use it as a combination as {Account.IDS} AND {OT2A.OBJ.IDS} for territory-based data access.

          Using them together guarantees that related objects are downloaded correctly, specifically ensuring that related entity downloads are limited to accounts already present on the mobile device. They can also be used independently based on the specific data synchronization requirements.

          Any object related to accounts

          Account IN ({ACCOUNT.IDS})

          {STI.OBJ.IDS} Makes sure the mobile app downloads the device sync transaction records to resolve offline unique IDs. DeviceSyncTransactionRecord object only OperationType = 'insert' AND OfflineUniqueIdentifier IN ({STI.OBJ.IDS})
           
          Loading
          Salesforce Help | Article