- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 09:43 AM - edited 02-13-2023 10:34 PM
Hello all,
I created a REST Message to create and update the record of SN instance1 to SN instance2.
Information I am storing in instance2 including instance1.table.record.sys_id and I am attempting to Update the record in instance2 based on sys_id as a parameter.
My POST is working fine but PUT is giving me an error msg: {"error":{"message":"Method not Supported","detail":"PUT method not supported for API"},"status":"failure"}
Could you help to advise what could be the mistake?
*note:sys_id is stored as u_correlation_id in instance2
REST Message:
PUT
AFTER UPDATE business rule
(function executeRule(current, previous /*null when async*/ ) {
var body = {
"u_organization": gs.getProperty('instance_name'),
"u_name": current.name.toString(),
};
try {
var r = new sn_ws.RESTMessageV2('my Integration', 'Default PUT');
r.setStringParameterNoEscape('u_correlationid',current.getUniqueValue());
r.setRequestBody(JSON.stringify(body));
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
} catch (ex) {
var message = ex.message;
}
})(current, previous);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 05:53 AM
Thank you Kirby. I need the sys_id to be dynamic and I've managed to achieve what I wanted with staging table and transform map.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 05:53 AM
Thank you Kirby. I need the sys_id to be dynamic and I've managed to achieve what I wanted with staging table and transform map.