- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 04:59 AM
Hi Developers/ @Ankur Bawiskar
This is related to one of the tricky requirement which I need to build.
I need to call an API on the load of a catalog form and the response I need to store in one of the catalog form field which is a drop down options field.
Please let me know how I can achieve this type of requirement.
Step by Step explanation would be helpful and also a type of sample code.
Thanks in Advance !!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 02:26 AM
@Rahul84 Have you tried this? if yes then please close the thread by marking all correct answers
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 05:13 AM - edited 12-07-2022 05:13 AM
should be easy enough.
1) onLoad catalog client script with GlideAjax
2) then add the choices via g_form.addOption()
Sharing link for your help
How to create an outbound REST API using Catalog Client Script
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 10:30 PM
Hi @Ankur Bawiskar ,
Thanks for the reply , could you please help us in the detailed explanation/solution of this requirement.
So it will be easy for me to start with.
1). onLoad catalog client script with GlideAjax
<< What exactly I need to do in this ?>>
Could you please help with the step by step explanation
Thanks !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 11:02 PM
you can check below links on how to call REST Message/SOAP message to call the API in server side
https://servicenow-docs.readthedocs.io/en/latest/REST_Messages/
https://dxsherpa.com/blogs/create-a-rest-message-how-to-read-the-docs-integration-part-2/
what did you start with?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 11:23 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader