User-wise filtering in any Master Tables on Dynamics NAV.

Naresh Vaneshwar
Nareshwar R.
Published in
1 min readJul 14, 2016

The latest requirement happens to be to show only the Bank Account which is relevant to one user. So this is not quite tough, to be honest, but we want to generalize this concept across all the master tables / list pages. So this would look a bit like AX-ish.

What we have done is implemented the User — Bank Permissions table to accommodate the relevant permissions. This table has two fields, User ID, and Bank Account No. which both are being primary keys of the table.

Then in the Bank Master, added a new Boolean FlowField to find whether this user has permission to the bank or not.

{ 50001; ;UserExistOnBank ;Boolean ;FieldClass=FlowField;
CalcFormula=Exist(“User-Bank Permissions” WHERE (User ID=FILTER(%USER),
Bank Account No.=FIELD(No.))); }

As this turns out, the significant difference is, in the Table Filter in FlowField as we have mentioned %USER in order to filter the current user.

Then in the Bank Account List Page, we have made a filter, which only TRUE records will be shown to the user.

By using this pattern, you can implement user-wise restrictions to all master tables and list pages.

Thank you Rasitha Chandrasekara for helping me in this research :)

--

--

Naresh Vaneshwar
Nareshwar R.

Technical findings and new developments on Business Central