Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Microsoft CRM Portals - Entity List custom filter

Posted on by

Hi all, 

I have the following scenario:

A customer (account) can be of different types and a customer can be hierarchically linked to another account.

Let's suppose that customer X (type a) is the father of customer Y (type b)

The logged in user (user1) on the portal has X as parentcustomerid.

The logged in user (user2) on the portal has Y as parentcustomerid.

On the portal there is an entity list showing the Orders (salesorder). An Order has a lookup pointing to account.

I want that the user1 can view all (and only) the Orders linked both to customer X and customer Y.

I want that the user2 can view all (and only) the Orders linked only to customer Y.

In oher words, based on the type of the parentcustomerid of a logged in user I want to apply a custom filter on the entity list.

How can I achieve that?

Thanks in advance. 

*This post is locked for comments

  • Verified answer
    RE: Microsoft CRM Portals - Entity List custom filter

    I have solved the problem in a hybrid way.

    First using the entity permissions with Parental scope between Account and Order.

    The fist permission is on Account with Contact scope working on a many to many relationship with Contact.

    The second one is on Order with Parental scope linked to the previous permission.

    There is also a server side part. A Plugin that populates the many to many relationship between Account and Contact that triggers on the changing of parentocustomerid of a Contact. It basically checks the type of the Account and "propagates" the association through the account's hierarchy.

    Hope this helps.

  • RE: Microsoft CRM Portals - Entity List custom filter

    Hello. Thanks for your answer. As far as I know the parental scope for entity permission is used to provide access to child entities related to a parent entity. I can't see how I can achieve my goal using parental scope.

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Microsoft CRM Portals - Entity List custom filter

    Hi,

    My suggestion will be to control this using Web Roles based on the user, you can define two Web roles where you can use parent scope and provide access to records.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans