Create an incident via scripting in Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 10:56 AM
Hi,
I am trying to create an incident in Flow Designer using custom action. I am not getting the result I wanted. Please let me know where I am making a mistake.
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 11:40 AM - edited 01-05-2024 12:55 PM
@Community Alums : In this case, just for the creation of an incident, a script is not required; you can simply use the "Create Record" activity and pass the necessary parameters to it. If you still want to proceed with the script, I see a couple of errors in it.
1. If caller is a reference field and you are passing a string as an input, you should be passing the sys_id of 'Abel Tuter' as an input.
2. The backend name of the caller is 'caller_id', not just caller, and you should be using the below syntax by assigning the values.
gr.caller_id = inputs.caller
where caller_id is the backend name of the "Caller" field on the Incident table and caller is a input variable that you defined in the flow action as input.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.