I am working on Extensible Data Security(XDS) Policy in Dynamics AX 2012.
I have made an X++ query which returns a warehouse number id depending on the currently logged in worker which is working fine.
In my query I have 1 datasource (InventLocation) table and in the range node I have added InventLocationId field when I hardcode a static value(like W1001) in the value property my program is working fine but when I call my function in the value property it doesn't work.
I have tested my X++ query in the job and it is working like it's used to. The problem which I see is that whenever a worker logins my class's method doesn't execute.
I've been stuck on this problem for a few days now. Would really appreciate any help.
I found the solution from the following document
http://www.microsoft.com/en-us/download/details.aspx?id=26921