Wednesday, 9 September 2015

Check access rights for menu item and call through code

public void jumpRef()
{
    MenuFunction    menuFunction;
    ;

    menuFunction = new MenuFunction(menuitemdisplaystr(smmProcessSalesDefinition), MenuItemType::Display);

    // Check access rights
    if (!menuFunction || !menuFunction.checkAccessRights())
    {
        // Access rights are not sufficient to use this function.
        throw error("@SYS81158");
    }

    menuFunction.run();
}

No comments:

Post a Comment