How can I pass display value instead of sys_id in rest for service catalog while using Buy method on rest catalog API .

Sumeet1877
Mega Expert

Hello Everyone ,

Greetings for the day !!

Need suggestion : How can I pass display value instead of sys_id in rest for service catalog while using Buy method on rest catalog API . 

Is this feasible & how ??

{

"sysparm_quantity": 1, 

"variables":{ "sc_requested_for":"cdec9c80db34be00ec22d79b5e9619e0","src_ci":"5adb9c07db2083808c27327e9d9619dc","src_support_grp":"fc858f21db6d360035bc591e5e9619b5","sc_short_desc":"Short description text","sc_desc":"Long description text"}

}

[ ie: I need to pass display value instead of sys_id here - "sc_requested_for":"cdec9c80db34be00ec22d79b5e9619e0" ]

1 ACCEPTED SOLUTION

Ok. In that case, I dont think we can do much about it. I checked the REST API function, and it is using the servicenow apis which is not accessible or editable by us. You may want to write your own API, if you want to use display value

 

find_real_file.png


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

3 REPLIES 3

SanjivMeher
Kilo Patron
Kilo Patron

What happens if you pass the display values?


Please mark this response as correct or helpful if it assisted you with your question.

It shows empty after the REQ is raised or the field remains blank .

Ok. In that case, I dont think we can do much about it. I checked the REST API function, and it is using the servicenow apis which is not accessible or editable by us. You may want to write your own API, if you want to use display value

 

find_real_file.png


Please mark this response as correct or helpful if it assisted you with your question.