<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Long Text Field Error when setting field with setIncident in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/long-text-field-error-when-setting-field-with-setincident/m-p/512390#M1122</link>
    <description>&lt;P&gt;We publish guides/playbooks on a 3rd party site for our analyst to use when troubleshooting an incident.&lt;BR /&gt;that 3rd party site has an api.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've successfully pulled the guide / page into the warroom and it displays and returns correctly using return_results&lt;/P&gt;
&lt;P&gt;return_results(decoded_contents)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I want to take the decoded_contents and dump them onto a new tab in the incident layout.&lt;/P&gt;
&lt;P&gt;I created a long text field and tried doing the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;demisto.executeCommand("setIncident", {'customFields': {"teplaybookdetail": "decoded_contents"}})&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This throws the following error:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"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)"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've successfully used the same command to set other fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts or advice?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Boyd&lt;/P&gt;</description>
    <pubDate>Fri, 19 Aug 2022 16:44:35 GMT</pubDate>
    <dc:creator>JoshBoyd</dc:creator>
    <dc:date>2022-08-19T16:44:35Z</dc:date>
    <item>
      <title>Long Text Field Error when setting field with setIncident</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/long-text-field-error-when-setting-field-with-setincident/m-p/512390#M1122</link>
      <description>&lt;P&gt;We publish guides/playbooks on a 3rd party site for our analyst to use when troubleshooting an incident.&lt;BR /&gt;that 3rd party site has an api.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've successfully pulled the guide / page into the warroom and it displays and returns correctly using return_results&lt;/P&gt;
&lt;P&gt;return_results(decoded_contents)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I want to take the decoded_contents and dump them onto a new tab in the incident layout.&lt;/P&gt;
&lt;P&gt;I created a long text field and tried doing the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;demisto.executeCommand("setIncident", {'customFields': {"teplaybookdetail": "decoded_contents"}})&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This throws the following error:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"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)"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've successfully used the same command to set other fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts or advice?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Boyd&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 16:44:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/long-text-field-error-when-setting-field-with-setincident/m-p/512390#M1122</guid>
      <dc:creator>JoshBoyd</dc:creator>
      <dc:date>2022-08-19T16:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Long Text Field Error when setting field with setIncident</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/long-text-field-error-when-setting-field-with-setincident/m-p/516134#M1239</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/210496"&gt;@JoshBoyd&lt;/a&gt;&amp;nbsp;– I was not able to replicate this error, but the following, slightly simpler line of code should also work; please give this a try:&lt;/P&gt;
&lt;PRE&gt;demisto.executeCommand("setIncident", {"teplaybookdetail": "decoded_contents"})&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that still doesn't work, could you share the full YML file of your script?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 23:38:27 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/long-text-field-error-when-setting-field-with-setincident/m-p/516134#M1239</guid>
      <dc:creator>asawyer</dc:creator>
      <dc:date>2022-09-27T23:38:27Z</dc:date>
    </item>
  </channel>
</rss>

