If you are on a newer NAV version (like 2016 or 2017) then there is the 'AccessByPermission' property - this could remove your need to write code for this.
If you are on a newer NAV version (like 2016 or 2017) then there is the 'AccessByPermission' property - this could remove your need to write code for this.
Answers
http://mibuso.com/blogs/davidmachanick/
See documentation here: 'https://msdn.microsoft.com/en-us/library/dn789517(v=nav.90).aspx'