AX 2012: Access Denied: SysOperationServiceController

Posted on Updated on

Recently I came across the following exception while executing a batch job via a menu item. The batch job has been written using the SysOperation Framework.

Exception:

Image

Resolution:

To fix this, please follow the steps below:

  1. Create Code Permission
  2. Link it with the menu item

Code Permission:

Image

Create a new code permission under AOT > Security > Code Permissions. Add a server method for the newly created code permission. Specify the following properties for the server method added:

  • Class: Your SysOperation service class
  • Method: Method name to invoke
  • EffectiveAccess: Invoke
  • ManagedBy: Manual

Linking:

Image

Now link your code permission with the menu item which is used to trigger the batch job. Use LinkedPermissionType and LinkedPermissionObject properties to achieve it! This should be resolving the exception.

Advertisements

2 thoughts on “AX 2012: Access Denied: SysOperationServiceController

    Mat said:
    January 30, 2016 at 3:20 am

    I have followed the above steps. Still getting the same error message.
    Generated Generated Incremental CIL and logged out and logged in back. Still the same error, please suggest.

    muhammadanaskhan responded:
    January 30, 2016 at 8:29 pm

    Debug to see which code is throwing exception. May be some method needs CodeAccessPermission.assert

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s