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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Record Level security in Purchase requisition

(0) ShareShare
ReportReport
Posted on by 73

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. 

I have the same question (0)
  • Andre Ghazaleh Profile Picture
    870 on at

    Hi Dalida,

    Which AX version you have? What is the error you get?

    Regards

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Dalila,

    Note that RLS is available in AX 2012, but has been deprecated. It would be better to work with eXtensible Data Security which is the replacement for this feature. You can read my blogs for some examples. dynamicspedia.com/.../

    Please also share the error message that is raised when creating a new order.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    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

  • dalila Profile Picture
    73 on at

    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
    73 on at

    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
    Andre Ghazaleh Profile Picture
    870 on at

    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

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    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

  • dalila Profile Picture
    73 on at

    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
    301,020 Super User 2025 Season 2 on at

    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?

  • Yuji Imaoka Profile Picture
    on at

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans