Create an incident via scripting in Flow Designer

Community Alums
Not applicable

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.

 

1.png

 

2.png

 

3.png

 

4.png

 

5.png

 

Regards

Suman P.

1 REPLY 1

Sainath N
Mega Sage
Mega Sage

@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.

 

sainathnekkanti_1-1704483617792.png

 

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.