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

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.

Hi @Ravi Chandra_K 

By changing the Requested For variable to Reference Type got rid of the "Item is unavailable for this user" error.

However, after submitting the request, RITM Requested for field does not match Who is this request for variable.

 

Any suggestion how I can fix this?  Thank you again.

 

Annie10_0-1690858382474.png

 

Is your catalog item Record Producer type?

Then you can bring map to field from form layout in the variable record, and add the field name there.

Please hit the thumb and Mark as correct if it helped!

 

Kind Regards,

Ravi Chandra

@Ravi Chandra_K 

This is just a regular Catalog Item.  I don't know why it behaving this way.  

 

Annie10_0-1690859939521.png