How to make 3rd party api connection, get the response and update fields in a widget on ServiceNow ?

Snehal13
Kilo Sage
 
There are 3 fields on ServiceNow Portal widget which is on incident table. These 3 fields need to be filled with values from an API response (API is third party)
 
How to write client controller and server script on the portal widget to achieve above requirement ?
2 REPLIES 2

Mark Manders
Mega Patron

Can you elaborate? If you are showing the incidents through the widget, you can also show those fields, so if they are filled on the form, why fill them through client controller/server script? 
Or those this information needs to be retrieved while logging a new incident (so the API is called on creation)?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Snehal13
Kilo Sage

Here are the details for you to help me further

 

On the Service Portal, there is a page that has a widget. This widget has few fields. What is want to do is make API call when the page (that has this widget) is loaded, get the response, parse it and map few values on the fields in the widget. This widget is on incident table. 

 

I  understand RESTMessageV2 API method, My question is how to combine/write client controller and server script on the portal widget to achieve above requirement ?