- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 09:21 AM
Need syntax for setting dynamic sys_id in End point for PUT method in REST Integration.
If below is the URL https://instanceb.service-now.com/api/now/table/incident/${incident_id}
then how to set value in incident_id. from Business Rule.
I have requirement to update record in Instance B if any record is updated in instance A. I have stored sys_id, number value of record from Instance B to Instance A so same number/sys_id i want to pass in end point URL of PUT method .
Need to know correct syntax for end point in that case and how to set value for the parameter
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 09:51 AM
Can you share your business rule that kicks off the webservice. Basically you need to set parameter like
r.setStringParameter('incident_id', current.XYZ); //XYZ is your field name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 09:51 AM
Can you share your business rule that kicks off the webservice. Basically you need to set parameter like
r.setStringParameter('incident_id', current.XYZ); //XYZ is your field name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2019 12:55 AM
Hi Mike,
I would like to update incident record using PUT method through dynamic sysid. Please help me to get the result.
Keeping reference code for reference.
Capturing partner sysid in partner_id.
var partner_id = current.u_string_1;
var request = new sn_ws.RESTMessageV2();
// request.setStringParameter('https://dev52757.service-now.com/api/now/table/incident', current.u_string_1);
request.setEndpoint('https://dev52757.service-now.com/api/now/table/incident/${partner_id}');
request.setHttpMethod('PUT');
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 05:00 PM
you need something like
var partner_id = current.u_string_1;
var request = new sn_ws.RESTMessageV2();
request.setEndpoint('https://dev52757.service-now.com/api/now/table/incident/' +partner_id);
request.setHttpMethod('PUT');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2020 02:52 AM
