Skip to main content
Solved

Restrict Requisition creator from creating order


Michael Ndungi
Varsity I
Forum|alt.badge.img

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.

Best answer by darylbowman

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.

View original
Did this topic help you find an answer to your question?

3 replies

darylbowman
Captain II
Forum|alt.badge.img+13

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.


Forum|alt.badge.img+3
  • Captain II
  • 317 replies
  • May 28, 2023

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.


aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 1206 replies
  • May 29, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings