Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Record Level security in Purchase requisition

Posted on by 55

Dear all 

I want to apply a filter on urchase requisitions where each user could see only PRs created by users of his/her department. or by reason (in our case reason = department). 

Please advise on how to apply the record level security in the explained cas. 

I have tried creating RLS on a role with filter on purchase requisition table, and a filter on the field created by. The result is good on the form all purchase requisition, the user could see only the appropriate PRs but when clicking ''New'' in order to create new PR, we get an error. 

Please to give advise on how to set the RLS in purchase requisition on the field ''reason'' .

Best regards. 

  • Suggested answer
    dalila Profile Picture
    dalila 55 on at
    RE: Record Level security in Purchase requisition

    Hello, 

    Here is a link explaining the Record level security set in : 

    Purchase order 

    Purchase requisition

    https://www.youtube.com/watch?v=mPe6UIzQX98

    Best regards. 

  • dalila Profile Picture
    dalila 55 on at
    RE: Record Level security in Purchase requisition

    Hello,

    I have finally found how to set the RLS on PRs by filtring on created by filter.

    The problem was resoved by adding new table ''PR lines'' on RLS and user the same filter for the PR table.

    Thanks to all for your support.

    Best regards.

  • Yuji Imaoka Profile Picture
    Yuji Imaoka on at
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: Record Level security in Purchase requisition

    Hi dalila,

    Can you share a screenshot to illustrate exactly what you mean with no access to create a new line? Do you get an error or is the grid not enabled?

  • dalila Profile Picture
    dalila 55 on at
    RE: Record Level security in Purchase requisition

    Thanks a lot André Arnaud, but I don't have technical resource for implementing XDS, I have seen that needs minimum of developing skills.

    I have tried the advice on the filter, it works, the new PR is created but no access to create new line and the workflow action pane is no displayed... for your information I used the same previous role privilege wich allowed users to create PR normally.

    On the RLS filter, I have set the below filters :

    Item group table : *

    Item invent table : *

    Purchase requisition table :"",user1,user2...

    So which table should be add to the RLS filter ? or is it another problem ?

    Thanks in advance.

    Best regards.  

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: Record Level security in Purchase requisition

    I would still recommend to use XDS, but to bypass this error, you can try to include an empty value in the filter. So instead of

    user1, user2

    use

    "",user1, user2

  • Suggested answer
    Andre Ghazaleh Profile Picture
    Andre Ghazaleh 870 on at
    RE: Record Level security in Purchase requisition

    Hi Dalila,

    As mentioned , XDS is recommended and RLS is depreciated. But if you still want to use RLS:

    You are filtering on field CreatedBy which will be updated during the actual insert not before that (when creating a new PR) , the message you get clearly shows that RLS is doing its job based on the filter criteria you provided.

    Regards

  • dalila Profile Picture
    dalila 55 on at
    RE: Record Level security in Purchase requisition

    Thanks for your proposal, here is the error message :

    Cannot create a record in Purchase requisition (PurchReqTable).

    You are denied access to create a record in the table due to the filter criteria set for the row level security.

  • dalila Profile Picture
    dalila 55 on at
    RE: Record Level security in Purchase requisition

    Thanks for your proposal, here is the error message : 

    Cannot create a record in Purchase requisition (PurchReqTable).
    You are denied access to create a record in the table due to the filter criteria set for the row level security.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Record Level security in Purchase requisition

    Hi dalila,

    Please have a look at Andre's blog where you can find a lot of good examples how to implement XDS.

    Yet, before doing that I would like to know why you need 'record level security' / XDS for purchase requisitions.

    I mean, those data are typically non business critical and 'top secret'.

    So, what's the value added from applying this for purchase requisitions?

    Best regards,

    Ludwig

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans