Loading
CRM Analytics
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
          Determine Row-Level Security for the Dataset

          Determine Row-Level Security for the Dataset

          Now it’s time to think about row-level security. How will you restrict access to each record in this dataset?

          Required Editions

          Available in Salesforce Classic and Lightning Experience.
          Available with CRM Analytics, which is available for an extra cost in Enterprise, Performance, and Unlimited Editions. Also available in Developer Edition.

          You decide to implement the following predicate on the dataset.

          'ParentRoleIDs' == "$User.UserRoleId" || 'OwnerId' == "$User.Id"
          Note
          Note The current dataflow doesn’t contain logic to create a dataset column named “ParentRoleIDs.” ParentRoleIDs is a placeholder for the name of a column that will contain this information. In the next step, you will modify the dataflow to add this column to the dataset. This column name will change based on how you configure the dataflow.

          Based on the predicate, CRM Analytics returns an opportunity record if:

          • The user who submits the query is a parent of the opportunity owner based on the Salesforce role hierarchy. CRM Analytics determines this based on their role IDs and the role hierarchy.
          • Or, the user who submits the query on the dataset is the opportunity owner.

          Let’s examine both parts of this predicate.

          Predicate PartDescription
          'ParentRoleIDs' == "$User.UserRoleId"
          • ParentRoleIDs refers to a dataset column that contains a comma-separated list of role IDs of all users above the opportunity owner based on the role hierarchy. You will create this dataset column in the next section.
          • $User.UserRoleId refers to the UserRoleId column of the User object. CRM Analytics looks up the user role ID of the user who submits the query from the User object.
          'OwnerId' == "$User.Id"
          • OwnerId refers to the dataset column that contains the user ID of the owner of each opportunity.
          • $User.Id refers to the Id column of the User object. CRM Analytics looks up the user ID of the user who submits the query from the User object.
           
          Loading
          Salesforce Help | Article