Look Up select box is not working via integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
1) In the background script is working fine :
var taskSysId = '5f1f516dc35203d05a76d5fe0501315d';
var grTask = new GlideRecord('sc_task');
if (grTask.get(taskSysId)) {
var ritmSysId = grTask.request_item.toString();
gs.info("Found Parent RITM: " + ritmSysId);
var test = new x_custom_scope.CustomScriptInclude();
var variableJSON = test.getVariableJSON(ritmSysId);
gs.info("Variable JSON Output:\n" + JSON.stringify(variableJSON, null, 4));
} else {
gs.error("Could not find an sc_task record with the provided sys_id: " + taskSysId);
}
2) when i run via Business rules and script includes its getting the Sys_id Instead of script inlcude in the payload generation
...
var variableJSON = CustomScriptInclude.getVariableJSON(current.request_item.toString());
....
var payload = {};
...
payload.variables = variableJSON;
....
// Genericized custom table name
var transactionlogGr = new GlideRecord('x_custom_scope_transaction_log');
transactionlogGr.initialize();
transactionlogGr.payload = JSON.stringify(payload);
.......................