Monday, 5 August 2013

Access denied: SubledgerJournalizationController for security roles on product receipt

In AX2012 while working on the security role I faced the following error while product receipt update:

Access denied: SubledgerJournalizationController
An error occurred during update
Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.
   at Dynamics.Ax.Application.FormletterService.Run() in FormletterService.run.xpp:line 178
   at Dynamics.Ax.Application.FormletterService.Postpurchaseorderpackingslip(PurchFormLetterPackingSlipContract _contract) in FormletterService.postPurchaseOrderPackingSlip.xpp:line 14
   at FormletterService::PostPurchaseOrderPackingSlip(Object , Object[] )
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)
   at Dynamics.Ax.Application.SysOperationServiceController.Runoperation(Boolean _async) in SysOperationServiceController.runOperation.xpp:line 93
   at Dynamics.Ax.Application.SysOperationServiceController.runServiceOperation(Object[] parameters) in SysOperationServiceController.runServiceOperation.xpp:line 22
   at SysOperationServiceController::runServiceOperation(Object[] )
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
   at Dynamics.Ax.Application.SysDictClass.invokeStaticMethod(Object[] _params) in SysDictClass.invokeStaticMethod.xpp:line 26
   at SysDictClass::invokeStaticMethod(Object[] )
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
   at Microsoft.Dynamics.Ax.Xpp.PredefinedFunctions.runAsInvoke(String className, String staticMethodName, Object[] parms, Object[]& exportInfolog)


In order to resolve this issue, you need to give access to the server method, go to user role and browse to the server method node as shown below and then right click and click "New server method" 


Now click on the properties and add the following details:



The class name should be "SubledgerJournalizationOperation" and the method that needs to be added should be "Journalize".

Below is the final output that you will see once you are done:



After adding this the issue will get resolved.

Hope this helps!

2 comments: