Announcements
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,
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.
Hi Muhammad,
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);
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.
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 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
Hi Muhammad,
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,
Have you tried to apply this code in the data source init method?
André Arnaud de Cal...
294,000
Super User 2025 Season 1
Martin Dráb
232,850
Most Valuable Professional
nmaenpaa
101,158
Moderator