Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Best way to restrict users to see lead's (other entities) records using Security Role

(0) ShareShare
ReportReport
Posted on by 147

Hello Guys,

Here i am trying to find a best way to restrict users to see lead's (other entities) records using Security Role without creating any other child Business unit.

Here is my example....

There are two teams as Team A and Team B. Each team has their own leader as Team Lead_A and Team Lead_B. Every team has two-two users as mentioned in screenshot. So what i want is that if any user of team creates any lead then it should be visible to him and team leader only other team member or team leader from different team should not be able to see this record. Admin is able to see all records.

I have created users, Roles and Teams but not able to get this done.

I don't want to create multiple child business unit or restrict it on views. So i just want to know that is it possible using Security Role only or what is the best possible way to achieve this.

pastedimage1571294136838v1.png

  • David L. Carr Profile Picture
    75 on at
    RE: Best way to restrict users to see lead's (other entities) records using Security Role

    It looks like there is a new feature that might help (in v9.0 online, anyway).   On the Security Roles Details page is a new setting: "When role is assigned to team".  There is a help link there, that links to this page:

    docs.microsoft.com/.../manage-teams

    I suspect the answer may be to create a role that has only "Owner" CRUD permissions for leads, and then assign that role to the teams. (And of course eliminate any access to leads from the user's security roles.)   You could then (code, workflow) ensure that the team owned the lead.  

    Hope this helps,

    Dave

  • Suggested answer
    Saad Kabarousse Profile Picture
    734 on at
    RE: Best way to restrict users to see lead's (other entities) records using Security Role

    Hello,

    This won't be possible using Security roles Only, you'll have to create BU for each team member.

    Other Solution : Register a Plugin OnPost RetrieveMultiple message of the appropriate entity.

    The Inputparameters collection of the IPluginExecutionContext object contains a property named "Query" That holds the Original QueryExpression. You can examine this query and add your filter to just retrive (My own records if i am not a leader)  or  (My records + My Other siblings's im i am a team leader ).

    Hope This helps :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans