Skip to Content
avatar image
Former Member

How my addon program can capture a license error exception


I want my addon can capture error when a user tries to open a form which is not allowed under user's current license. I am using ActivateMenuItem() method to open a form from my addon, although I put the code inside a try/catch block but it doesn't capture the exception. According to SDK document, method ActivateMenuItem() should throws an exception when trying to activate system menu items which are disabled. Now SAP just display an error message in the system message log area saying "You cannot open window[60110] Service Call with your current license". My question is that is there a way to capture this error in my addon?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 02, 2016 at 04:13 PM

    Hi Lan,

    Note that it throws when the item is disabled. Disabled does not necessarily mean that you don't have permissions.

    You can have an enabled menu item and still not have permission to access a given form.

    And it's also possible to have a disabled menu item, and have permission to access a form.

    To obtain the permission of a user for a given object you can use the SBObob.GetObjectPermission() method.

    You can further manipulate permissions with UserPermissionTree, UserPermissionForms, UserPermission, and Users objects.

    There is also a sample on permissions on the SDK Samples directory.

    Pedro Magueija

    LinkedIn | Twitter | Blog

    Add comment
    10|10000 characters needed characters exceeded