Prevent users from checking out a cart with items that contain different requested for

JamesAcevedo88
Tera Contributor

So I'm using a variable set that contains a Requested for variable of that type. i want to know how can I prevent users from checking out a cart with different items with different requested for in the same request

5 REPLIES 5

Tanushree Maiti
Tera Sage

Hi @JamesAcevedo88 

 

Generally  Requested For field is defaulting to logged in user in Service Request . It is editable to logged in user ,so that  if Requested for is unable to login into instance  , in that case some other ppl from their team or manager can raise request on their behalf.

 

If you have approved business Requirement to apply strict rule ,so that only logged in user can submit their request  & they can not raise request on any one's behalf:

 

In that case- Add a logic that 

Only for User with Admin Role, Requested for is editable,

                                                                 apart from Admin role, Requested for is non-editable (defaulted to logged in user).

You can use Onload Client script by which you can check logged in user role.

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: