web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

how to add role base restriction to views in Dynamics 365 marketing

(0) ShareShare
ReportReport
Posted on by

Hi 

We have two different clients using D365 marking for sending out marketing emails. 

I created two apps (AppA and appB) based on D365 marketing for those clients. However, Client A used AppA to create customer journeys, marketing emails, segments for their needs.  when client B tries to create customer journeys, marketing emails, and segments using AppB. The client B can see all the customer journey, marketing emails, and segments created by Client A.

How I can display the customer journeys, marketing emails and segments only belongs to Client B or Client A.

Thank you,

Siva

  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    Hi Siva,

    You could refer to following two approach:

    Simple way:

    Add Client A and Client B to different business units,(those two BUs should be at same level.) then set Read Privilege on Customer Journey, Marketing Email and Segment of Client A and Client B's security roles to BU level.  

    https://www.azamba.com/2018/04/26/how-to-restrict-records-by-business-unit-in-microsoft-dynamics-365-for-sales-crm/

    Pros: Records that what Client A and Client B can see will be totally restricted, they can't find records which belong to other clients even with Advanced Find.

    Cons: They need to be added to different BUs.

    Complex way:

    Register a plugin within the PreOperation stage of RetrieveMultiple request, pass custom filters to the view.

    (RetrieveMultiple: It will trigger every time Dynamics loads any grids: views and subgrids.)

    In the plugin, check name of the current user, if current user is Client A, then adding a filter " owner eq 'Client A' " to query of context to only show records which belong to client A.

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/org-service/samples/modify-query-preoperation-stage

    https://medium.com/@chirag.kanzariya/uci-dynamics-crm-how-to-use-retrievemultiple-plugin-to-pass-custom-code-in-subgrid-f64c99f329ce

    Pros: Client A and Client B can be in the same business unit.

    Cons: Writing code is required.

    Regards,

    Clofly

  • Community Member Profile Picture
    on at

    Thanks a lot Clofly,

    I followed the simple way using this URL. it is working now.

    www.azamba.com/.../

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 71 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 43

#3
Syed Aqib Raza Profile Picture

Syed Aqib Raza 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans