Comments
02-09-2022
05:29 AM
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
02-09-2022
05:29 AM
Thanks,
Anil Lande
02-09-2022
05:45 AM
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
02-09-2022
05:45 AM
Thank you for this. Pretty new to writing articles 🙂
10-21-2022
03:35 AM
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
10-21-2022
03:35 AM
hi Ashish, how did u manage to update the variables? I've wrote below script but the variable is not updating even if the request is successful, tried POST/PUT/PATCH
(function process( /*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
var pathParams = request.pathParams;
var obj = pathParams.number; // [false]
var ritm = new GlideRecord("sc_req_item");
var reqbody = request.body;
var reqdata = reqbody.data;
if (obj && obj != '') {
ritm.addQuery("number", obj);
ritm.query();
if (ritm.next()) {
ritm.variables.u_name = reqdata.variables.mgmt;
ritm.work_notes = "owrk"; //Parameter means the key in JSON
ritm.update();
}
}
})(request, response);
05-21-2024
03:32 AM
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
05-21-2024
03:32 AM
@John Andre See Apologies, i have been away from the community for quite some time now. Reaching out if you got all you wanted or need some other help.
