Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

Extensible Data Security for specific company

Posted on by 10

Hello to all,

I need to apply a extensible data security policy through a user role only for one company. I setup the specific company in the role organization asiggnement, but the query is applying in every company.

Any help would be much appreciated.

Best regards

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,835 Super User on at
    RE: Extensible Data Security for specific company

    Hi csaez,

    In this reply, I do assume the smmBusRelTable is having data per legal entity and it is not shared via a virtual company.

    It would be possible to create a MyConstruct table having data per legal entity with the user IDs which are allowed to be visible.

    The query should then have the smmBusRelTable as main datasource and the new MyContstruct table linked on the UserID and the MTHComercial field.

    In the example provided above, you can learn how to create an xds() method which loops through the different legal entities (source code is downloadable for free). Then insert in all legal entities all users to this table and in the specific LE only the current user. The MyConstruct is a temporary table which will be initialized on the first access and has a specific instance per user.

    The result would be a table with is having as example the next records for User1 (assuming you have the legal entities 'kad', 'co1' and 'co2':

    kad - User1

    co1 - User1

    co1 - User2

    co1 - User3

    co1 - User4

    co1 - User5

    co1 - User6

    co2 - User1

    co2 - User2

    co2 - User3

    co2 - User4

    co2 - User5

    co2 - User6

    Please let me know if this helps you.

  • csaez Profile Picture
    csaez 10 on at
    RE: Extensible Data Security for specific company

    Hi Andre,

    The custom field is filled on every single record of business relations, regading of the legal entity. We are working with 3 different legal entites and 15/20 different users more or less.

    Thanks

    Best regards

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,835 Super User on at
    RE: Extensible Data Security for specific company

    Apologies for a new question, but I'm not aware how the custom field MTHComercial is used. Is this field on other legal entities also containing the user ID?

    For a potential performance impact, how many different users and business relations do you have in total in your environment?

  • csaez Profile Picture
    csaez 10 on at
    RE: Extensible Data Security for specific company

    Hi Andre,

    Users with this role have to see only the business relations with MTHComercial = curuserid() in 'kad' company. In other companies users must see every single record from business relation.

    The query setup it's not the main problem for me, what i want to know is if is there any setup option for the XDS for applying in one single company.

    Thanks

    Best regards

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,835 Super User on at
    RE: Extensible Data Security for specific company

    Hi csaez,

    What is the condition to constrain the records? Which records based on what field should be visible or hidden? I do see a field used in your query called MTHComercial. What values will be restricted and is this for all users or some with the specific role? Are these values also used in other legal entities? There might be an option to achieve it with XDS, but then I need to know more details.

  • csaez Profile Picture
    csaez 10 on at
    RE: Extensible Data Security for specific company

    Hi Andre,

    If XDS policy is enforced on the AOS regardless ot the organization assignements I can't use it for my purpose, because it's precisely what I want.

    My XDS policy filter the smmBusRelTable records. I need to do that only in a specified organization/dataareaid.

    Thanks

    Best regards

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,835 Super User on at
    RE: Extensible Data Security for specific company

    Hi csaez,

    When you have defined a XDS policy, it is enforced on the AOS regardless of the organization assignments. Can you provide the exact details what you want to secure? Potentially, you have to include a so called MyConstruct table where you will add values per legal entity.

    I have created an example, which you can download for free, where it can have a setup per legal entity.

    See my blog: dynamicspedia.com/.../

    If you provide the exact details what needs to be restricted and why, we can potentially help you with the best solution direction.

  • csaez Profile Picture
    csaez 10 on at
    RE: Extensible Data Security for specific company

    Here my security elements:

    pastedimage1594296413817v1.png

    Range query value is: (currentuserid).

    I assign the role to a single one organization. I want this security query only for this company. I don't want this extensible data security applies in other organizations:

    pastedimage1594296750211v3.png

    When i go to the business relations form, the query is not filtering only in 'kad' company, is filtering in every company i have.

    Thanks.

    Best regards

  • Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Extensible Data Security for specific company

    Hi,

    Can you share details of your configuration?

    Many thanks,

    Ludwig

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,835 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,526 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans