Hello!
I have a question regarding system operation permissions. My goal is to find out if the current user has a specific operation permission. In order to do that within a business process, I've used the template from the marketplace with success. I'd like to do the same in client-code, for example in the Javascript code of an object page – ultimately I want to show some specific buttons only if the current user has specific operation permissions.
How can I achieve this?
Kind regards
Kai
Like
Hi Kai,
you can use such code in onEntityInitialized method
RightUtilities.checkCanExecuteOperation({operation: "UsrYourOperationPermission"}, function(result) { this.set("UsrYourAttribute", result); }, this);
Then use this Attribute in Business rules or anywhere else.
And use "RightUtilities" in page definition as well:
define("OpportunityPageV2", [ "RightUtilities"], function(RightUtilities) {...
Kind regards,
Vladimir
Hi Kai,
you can use such code in onEntityInitialized method
RightUtilities.checkCanExecuteOperation({operation: "UsrYourOperationPermission"}, function(result) { this.set("UsrYourAttribute", result); }, this);
Then use this Attribute in Business rules or anywhere else.
And use "RightUtilities" in page definition as well:
define("OpportunityPageV2", [ "RightUtilities"], function(RightUtilities) {...
Kind regards,
Vladimir