Skip to main content

I need to restrict the creator of requisition from creating the purchase order.
i.e 
The Create orders button should be disabled for the creator of requisition.

Kindly assist on this
Any kind of responses is always highly appreciated.

You can use Base.AccessInfo.UserID to compare the current user's user ID to whatever the Creator's user ID is. Then, conditionally disable the action.

Something like:

bool isUserCreator = Base.AccessInfo.UserID == requisition.CreatedByID;

actionName.SetEnabled(userIsCreator)

 

Do this in the RowSelected event of the Requisition.


Hello @development93 ,
How about restricting the access using Access Rights by Screen (SM201020) screen?
Revoking the access to the role, under Purchases → Requisitions → Requisition → Create Order

 

 

or by Access Rights by User (SM201055)

Purchases → Create Orders.
 


Regards.


The access right either takes away the permission or grants it. It doesn’t function conditionally unless it is a new feature that I am unaware of. As @darylbowman indicated customization is needed here to only disable the action (!=) if the user is the requester too. I have not tried but it might be possible to manipulate the actions visibly in the workflow for some simple stuff like this.


Reply