Need help with User Criteria Script.

Annie10
Tera Contributor

Hello,

I really need someone to help me with this issue.  

 

1. Created User Criteria 

Annie10_0-1690844618691.png

 

2.  I added the User Criteria to the Catalog Item under Available For:

 

Annie10_1-1690844717137.png

 

3.  I impersonated an IT Service Desk Team and try to submit a request on behalf of someone, I'm getting "Item is unavailable for this user" and I can not submit the request.

 

Annie10_2-1690844843883.png

 

 

4.  I would like only the members of IT Service Desk able to see and submit a request behalf of anyone.  Please help.  Thank you 

 

1 ACCEPTED SOLUTION

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @Annie10 

Greetings!

This is expected behavior.

If that on hehalf of some one, Requested for person doesn't meet the user criteria, that error will come.

The solution would be changing the variable type to Requested for from Reference type.

refer the below thread:

https://www.servicenow.com/community/developer-forum/if-a-form-is-not-available-to-a-user-then-any-o...

Please hit the thumb and Mark as correct based on Impact!!

 

Kind Regards,

Ravi Chandra.

View solution in original post

9 REPLIES 9

Then it has to be mapped with scripts like BR

refer the below links:

https://www.servicenow.com/community/itsm-forum/how-to-set-quot-requested-for-quot-on-request-and-re...

https://www.servicenow.com/community/now-platform-forum/i-need-to-map-field-requestor-in-service-cat...

Please hit the thumb and Mark as correct based on Impact!!

 

Kind Regards,

Ravi Chandra

@Ravi Chandra_K 

I don't know what and where I made a mistake, but it is not working:

 

Business Rule:

Annie10_1-1690862551420.png

 

 

Annie10_0-1690862523638.png

 

Variables:

 

Annie10_2-1690862600251.png

 

 

 

 

 

Annie10
Tera Contributor

@Ravi Chandra_K 

I got it to works by using Flow Designer Action:

Annie10_3-1690863690032.png

Many thanks to you for your time and effort.

glad you resolved it. 

Kind Regards,

Ravi Chandra.

Thank you for help resolving the error message