How we get record level security data from selected record level query using X++.
What do you mean by the question? Are you looking for an introduction to how to use RLS? Are you aware of that AX 2012 came with a new solution replacing RLS? It’s called Extensible Data Security (XDS).
Martin! i want to customize report for record level security which show data (Role, Table name and criteria) as mention on attachment. Report show me Role and Table name, how i get criteria data?? I think you understand what i mean to say.
It’s stored in SysRecordLevelSecurity.Restriction field as a packed QueryRun instance. Unpack the object (new SysQueryRun(sysRecordLevelSecurity.Restriction)) and then extract information you’re interested in (e.g. iterate query ranges and extract field names and range values).