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 :
Microsoft Dynamics AX (Archived)

RLS on document types

(0) ShareShare
ReportReport
Posted on by

Hi,

There is customer requirement where user in HR manager role can attach only particular types of document available in DocuType Table.

So when he opens document attachment form and Clicks a 'New' Button, he should not see all the types of document in that Menu. He should be able to see only those types where he is supposed to be.

I tried to setup Record level security for that security role and put DocuType table and configured Query with DocuType table where TypeId is set a particular document Type. But this is not working. HR person still can see all the document types.

As client has created too many document types, the user will easily get confused which document type to select while attaching a file. That's why they want user to see limited types of documents based on his/her security role.

How to achieve this easily? RLS should work here, shouldn't it?

*This post is locked for comments

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    308,167 Super User 2026 Season 2 on at

    Hi VDY,

    You can use eXtensible Data Security (XDS)  for this purpose. RLS will limit records on the form. XDS enforces the security on another level. Based on the available document types a menu is generated on the document handling form.

    If you use XDS, it will work. Note that there are some basic types like Document, Note, URL. They must be part of the XDS query then. Otherwise AX tries to insert those records while they are already in the database. You will get an error then.

  • Verified answer
    Community Member Profile Picture
    on at

    I could achieve it by just customizing init method of DocuView Form.

    You need to use below code if you are opening form "Docuview" from other form/table.

    This will be place inside the while loop of DocuType and add only your required docuTypes.

    if(primaryTable == tableId2name(tableNum(yourtableName))

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Prashant Singh Profile Picture

Prashant Singh 2

#1
nmaenpaa Profile Picture

nmaenpaa 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans