There is no translation available for this article. Il n'y a pas de traduction pour cet article

When a user tries to perform some action from AX; he may get a Access Denied message to server methods:

Even if this sample uses a custom method called CIRBPurchLineSplitterController, the following procedure may work for your own methods (and built-in methods).

Based on the error above, the user tries to execute the Menu Action called CIRBPuchLineSplitterController. We can find it from the AOT.
If we have a look on the properties box of the menu item, it has for parameters a Class called in this case CIRBPurchLineSplitterService.splitPurchLines :


Here is the class called:

What we have to do is to allow the user's security profite to invoke that Server Method.
From the user Security role you want to edit, in the Permissions tab, right click on the Server Methods and select New Server Method

From the NewMethod created, use the dropdown menu on the class property to find the class you want to use. In this case we want to use the CIRBPuchrLineSplitterService class

Once selected, type the Method you want to target. In this case we want to target the splitPurchLines method.
Set the EffectiveAccess of the method to invoke to allow that role to invoke the method.

Now save your role and check everything is working fine witht the desired role.


blog comments powered by Disqus