Inputs to flow designer script is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 06:23 AM
Dear All,
I tried to write a script for task sla table, but its not accepting the inputs if i provide the sys_id..Please help. It says input is invalid. Trigger of my flow is task sla.
var inputs = {};
inputs['sys_id'] = '23f306c4dbc7c1d0f328a05605961910';
var result = sn_fd.FlowAPI.getRunner()
.flow('global.test123')
.inBackground()
.withInputs(inputs)
.run(); //
var contextId = result.getContextId();
gs.info(contextId)
Kind Regards,
Kavya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 03:03 PM
Hello Kavya,
I don't know if this will help you, but it might help someone with the same question.
To get the sla_flow_inputs you can open a similar triggered sla flow, click the on trigger pill and copy the value from the sla_flow_inputs object.
I tried the script below and it worked! You will also need to get and change the current task_sla record and the technical name of the flow.
var inputs = {};
inputs['sla_flow_inputs'] = {
"duration": "1970-01-04 00:00:00",
"duration_type": null,
"is_repair": false,
"name": "Resolução de Solicitação - 72 horas",
"relative_duration_works_on": "Task record"
}
inputs['task_sla_record'] = current;
sn_fd.FlowAPI.getRunner().flow('global.FLOW_NAME').inForeground().withInputs(inputs).run();