Task : Once a Sales Order has been confirmed, it is to be locked so that Sales Personnel may not edit the order; edits may only be performed by personnel at the Corporate Office.
1. I created Menu item , assigned privilege and duty and assigned to role “Sales Manager”
2. So now I modified the code in Class\SalesTableListPageInteraction\setButtonSell() method
SecurityRights sr;
SalesTable salestable;
AccessRight accessRight = AccessRight::View;
boolean hasAccess;
sr = SecurityRights::construct();
accessRight = sr.menuItemAccessRight(SecurableType::MenuItemDisplay,menuitemdisplaystr(Cit_SecurityTest));
if(accessRight == AccessRight::View && salestable.DocumentStatus == DocumentStatus::Confirmation)
{
allowUpdate = true;
}
Else
{
allowUpdate = false;
}
How to create Privelege ...
How to create Privelege ...
No comments:
Post a Comment