BBE
BBE

Reputation: 1

Dynamics AX : Restrict Security policy (xDS)

We have defined a ProjectManager role. We want to restrict the list of accessible project. The idea is to only allow access to project to of the user's department. The department information is available in a field of the employee and in a financial dimension on the project.

I've created my xDS and it works fine.

But a project manager can sometimes work on projects for other departments. So I want to "disable" the xDS when the user fills in his timesheets. Because the xDS also restrict the project list when the user add a line in his timesheets.

Do you have an idea?

Upvotes: 0

Views: 1061

Answers (1)

Geoffrey DELMEE
Geoffrey DELMEE

Reputation: 782

First of all, you can try to deactivate the XDS for your operation:

XDSServices xds = new XDSServices();
xds.setXDSState(false);
//Do what you have to do
xds.setXDSState(true);

Then, regarding your business case, you may go with this command and restrict the list of projects with a join query. Or you could go to another XDS with a MyProject tempDB table containing all projects the worker works on. Then, you will have no more filtering issue for this. But you'll have to implement additioal filter/restriction on other departements projects.

Upvotes: 1

Related Questions