Notifications
Announcements
No record found.
Is there a way to disable record level security on a single form in X++? I tried doing the following on form datasource executeQuery method but it didn't work:
formDatasource_ds.query().recordLevelSecurity(false);formDatasource_ds.queryRun().recordLevelSecurity(false);
Hi Muhammad,
Have you tried to apply this code in the data source init method?
Like Sergei mentioned, you can try the init method on the datasource or the form.
There is also another command which can be used to enable or disable XDS: XDSServices.setXDSState
Hi Muhammad Anas Khan ,
Record-level security is bypassed in the following situations:
1,Using display and edit methods
2,Using FormListControl, FormTreeControl or TableListControl to show data
3,Using a temporary table as a data source
docs.microsoft.com/.../record-level-security
Hello Muhammad,
That is an interesting request. If I read this thread I wonder why you need XDS but not for a specific form? Is this an exception for a specific group of people that can use the form or what is the reasoning behind?
Just curious ... :-)
Ludwig
Hi Ludwig,
Yes you are correct. This is kind of a contracting business requirement! There is custom inquiry form which should be global (cross-company), showing records from all companies. At the moment, customer assigns organisations at the user role level to restrict access to limited companies for a user. However for this particular form they want users to see data from all companies.
In this case, you need to consider if SaveDataPerCompany parameter. If it's enabled on the table used on the form, you need to activate cross-company selects.
q.allowCrossCompany(true);
Are the tables on the datasource also used on other forms and part of the XDS policy?
Another workaround would be creating a new view with the contents of the table you want to show unrestricted. The view is considered as a new table name and in this way you can bypass the XDS policy on the original table.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 544 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader