---
schema_version: "1"
id: 252018db41c42b88e86755ccaa489b26c5e4b34b969abd232625658bf16a7f31
title: Row-Level Security Example based on Opportunity Teams
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_security_rowlevel_example_teammembership.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_teammembership.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 0d961e3c7f22f190bebdaa808358f41d444c095485281d32d389970226766a3a
description: Let’s look at an example where you create a dataset based on Salesforce data and then implement row-level security based on an opportunity team. In this example, you will create a dataset that contains only opportunities associated with an opportunity team. To restrict access on each record in the dataset, you will create a security policy where only opportunity members can view their opportunity. This process requires multiple steps that are described in the sections that follow.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Row-Level Security Example based on Opportunity Teams

Let’s look at an example where you create a dataset based on Salesforce data and then implement row-level security based on an opportunity team. In this example, you will create a dataset that contains only opportunities associated with an opportunity team. To restrict access on each record in the dataset, you will create a security policy where only opportunity members can view their opportunity. This process requires multiple steps that are described in the sections that follow.

1. **[Determine Which Data to Include in the Dataset](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_teammembership_determinedata.htm&release=264.0.0&type=5)**  
    First, determine what data you want to include in the dataset. For this example, you will create an OppTeamMember dataset that contains only opportunities associated with an opportunity team.
2. **[Design the Dataflow to Load the Data](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_teammembership_designdataflow.htm&release=264.0.0&type=5)**  
    Now it’s time to figure out how the dataflow will extract the Salesforce data and load it into a dataset. You start by creating this high-level design for the dataflow.
3. **[Determine Row-Level Security for the Dataset](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_teammembership_determinerls.htm&release=264.0.0&type=5)**  
    Now it’s time to think about row-level security. How will you restrict access to each record in this dataset?
4. **[Modify the Dataflow Based on Row-Level Security](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_teammembership_addpredicate.htm&release=264.0.0&type=5)**  
    It’s now time to add the predicate in the dataflow definition file.
5. **[Create the Dataset](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_teammembership_createdataset.htm&release=264.0.0&type=5)**  
    Now that you have the final dataflow definition file, you can create the dataset.
6. **[Test Row-Level Security for the Dataset](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_teammembership_testpredicate.htm&release=264.0.0&type=5)**  
    You must verify that the predicate is applied properly and that each user can see the appropriate opportunities.