<?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>question Re: Work notes is not populating via setValue() in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436315#M93241</link>
    <description>&lt;P&gt;Hi Jaspal,&lt;BR /&gt;is there any way to add multiple work notes in a single update?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2019 07:24:05 GMT</pubDate>
    <dc:creator>Sai Shekhar</dc:creator>
    <dc:date>2019-09-10T07:24:05Z</dc:date>
    <item>
      <title>Work notes is not populating via setValue()</title>
      <link>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436311#M93237</link>
      <description>&lt;P&gt;This might be simple but I have never had to work with journal entries before. I was wondering if they behave differently that normal string fields. Here is an example/problem I am facing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to update the Work Notes field but am having no success. Eventually this will be run from a workflow script but currently I am testing this in a business rule.&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15130227282947864 jive_text_macro" data-renderedposition="71_8_1192_96" jivemacro_uid="_15130227282947864" modifiedtitle="true"&gt;&lt;P&gt;var info = 'data';&lt;/P&gt;&lt;P&gt;var gr = new GlideRecord('table name here');&lt;/P&gt;&lt;P&gt;gr.initialize();&lt;/P&gt;&lt;P&gt;//see below&lt;/P&gt;&lt;P&gt;gr.insert();&lt;/P&gt;&lt;P&gt;gr.update();&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Below are the multiple way I have tried to insert data into the work notes field with zero luck.&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15130228556232709 jive_text_macro" data-renderedposition="188_8_1192_64" jivemacro_uid="_15130228556232709" modifiedtitle="true"&gt;&lt;P&gt;gr.setValue('work_notes', info);&lt;/P&gt;&lt;P&gt;gr.setValue('work_notes', 'data');&lt;/P&gt;&lt;P&gt;current.work_notes = info;&lt;/P&gt;&lt;P&gt;current.work_notes.SetJournalEntry(info);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone could tell / explain to me what it is that I am doing wrong would be really helpful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. &lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 20:12:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436311#M93237</guid>
      <dc:creator>123456789456123</dc:creator>
      <dc:date>2017-12-11T20:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Work notes is not populating via setValue()</title>
      <link>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436312#M93238</link>
      <description>&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Try using&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;gr.work_notes='Data';&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/159592i6F593EF06F3D4FE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Dec 2017 20:15:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436312#M93238</guid>
      <dc:creator>Jaspal Singh</dc:creator>
      <dc:date>2017-12-11T20:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Work notes is not populating via setValue()</title>
      <link>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436313#M93239</link>
      <description>&lt;P&gt;Thank you. I knew I was missing something... Have a good day, &amp;nbsp; &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Dec 2017 20:26:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436313#M93239</guid>
      <dc:creator>123456789456123</dc:creator>
      <dc:date>2017-12-11T20:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Work notes is not populating via setValue()</title>
      <link>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436314#M93240</link>
      <description>&lt;P&gt;instead of using&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;gr.setValue('work_notes', 'data'); //setValue does not work for field of type journal input&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you can use&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;gr['work_notes'] = 'data';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This last syntax is especially useful when 'work_notes' is contained in a variable.&lt;/P&gt;
&lt;P&gt;Exemple&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var fieldName = 'work_notes';
gr[fieldName] = 'data';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ximizu&lt;/P&gt;
&lt;P&gt;&lt;A title="http://ximizu.io" href="http://ximizu.io" target="_blank" rel="nofollow"&gt;http://ximizu.io&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 14:12:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436314#M93240</guid>
      <dc:creator>Ximizu</dc:creator>
      <dc:date>2018-08-22T14:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Work notes is not populating via setValue()</title>
      <link>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436315#M93241</link>
      <description>&lt;P&gt;Hi Jaspal,&lt;BR /&gt;is there any way to add multiple work notes in a single update?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 07:24:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436315#M93241</guid>
      <dc:creator>Sai Shekhar</dc:creator>
      <dc:date>2019-09-10T07:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Work notes is not populating via setValue()</title>
      <link>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436316#M93242</link>
      <description>&lt;P&gt;Simply&amp;nbsp;assign the value directly but make sure to make&amp;nbsp;it a string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;inc.work_notes =&amp;nbsp;value + "";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;or&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;inc.work_notes =&amp;nbsp;value .toString();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nayan&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 03:57:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/1436316#M93242</guid>
      <dc:creator>Nayan Mahato</dc:creator>
      <dc:date>2022-02-09T03:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Work notes is not populating via setValue()</title>
      <link>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/2728001#M1052723</link>
      <description>&lt;P&gt;Thank you!!! Help me a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 11:40:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/work-notes-is-not-populating-via-setvalue/m-p/2728001#M1052723</guid>
      <dc:creator>josePinho</dc:creator>
      <dc:date>2023-11-09T11:40:36Z</dc:date>
    </item>
  </channel>
</rss>

