Long Text Field Error when setting field with setIncident

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Long Text Field Error when setting field with setIncident

L2 Linker

We publish guides/playbooks on a 3rd party site for our analyst to use when troubleshooting an incident.
that 3rd party site has an api.

 

I've successfully pulled the guide / page into the warroom and it displays and returns correctly using return_results

return_results(decoded_contents)

 

However, I want to take the decoded_contents and dump them onto a new tab in the incident layout.

I created a long text field and tried doing the following:

 

demisto.executeCommand("setIncident", {'customFields': {"teplaybookdetail": "decoded_contents"}})

 

This throws the following error:

"Error from Scripts is : Script failed to run: Error: Failed to decode (loop) data from docker code script: invalid character '{' after object key:value pair This may happen when you don't return an explicit entry (or entries) from a script. for entry structure please review the 'Script Helper' (2605) (2604) (2603)"

 

I've successfully used the same command to set other fields.

 

Any thoughts or advice?

 

 

Thanks,

Boyd

1 REPLY 1

L3 Networker

Hi @JoshBoyd – I was not able to replicate this error, but the following, slightly simpler line of code should also work; please give this a try:

demisto.executeCommand("setIncident", {"teplaybookdetail": "decoded_contents"})

 

If that still doesn't work, could you share the full YML file of your script?

  • 2062 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!