- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2019 04:48 AM
hi developers,
As am not a pro in service-now need help I have variables section on my task form or am using third party application......so when am fetching the details using the application in my response am not able to get the values of the variable field and for that i wrote a business rule
try {
var r = new sn_ws.RESTMessageV2('HTTP_REST_API', 'POST');
r.setStringParameterNoEscape('sys_id',current.sys_id);
r.setStringParameterNoEscape('description',current.description);
r.setStringParameterNoEscape('short_description',current.short_description);
r.setStringParameterNoEscape('instance_id',current.variables.instance_id); // variable field
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
}
catch(ex) {
var message = ex.getMessage();
}
as you can see in the above code the instance field value is needed but am not getting where am going wrong...please help me with this
thanks in advance!!