Hello to all,
I need help to solve the following issue using EDSP.
Scenario: we have an enterprise with 1 holding company and 3 subsidiaries, all company are separate legal entities. Workers at a time are employed in only one company of the Group but can move from a company to another.
We uploaded Workers in the DAT company and created for each worker an employment detail to record the information of worker's actual company. The requirement is users of the subsidiaries company can view and modify only workers and employment belonging to their company, while users of the holding can view and change data of all workes.
I thought to create specific roles for users of subsidiaries and associate to each role an Extensible Data Security Policy which using as primary table HcmEmployment and using as constrained table HcmWorker.
In the linked query I specified a range on LegalEntity field with value currentcompany and in the init method I specified for the query the validTimeStateDateTimeRange from minimun and maximum utcdate values, because I would include in the constrained table the past worker.
Issue: The policy works fine when I list actual worker in a subsidiaries company but the Past worker list is empty. It seems the validTimeStateDateTimeRange in the init method doesn't work.
Can someone suggest a solution?
Have you analysed the SQL query when you select "Past workers"? You can use the AX debugger, AX SQL trace or SQL Server Profiler to do that.
no I didn't, I'll try.
Hello to all, I solved the issue using as primary table a temporary table with xds method that select all hcmemployment record of current company with the clause validtimestate(mindate, maxdate). The only issue that remains open is about primary table refresh. Using the parameter RefresfFrequency::PerSession, new worker created is showed in pagelist only after user close and reopen session. Using the parameter ReFreshFrequency::PerInvocation, when user create a new worker the session doesn't respond.
Business Applications communities