1
0
-1

Hi


We're looking for a way to add a work note in ServiceNow, even if the replica has no comment. For example, to close a "catalogTask", a work note is required.


We check in the incoming sync if the remote side was "resolved" and based on that we wanted to simply insert a work note. On the documentation is says the work_note enitity is not supported and the commentHelper class seems to not support addComment in ServiceNow.


Any ideas on how to achieve it?


Thanks in advance!

Kind regards

Jorden

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      You can assign the value to entity.work_notes like in 


      incident.work_notes = "Hello World"


      This should be sufficient.

      Very important - don't do 

      incident.work_notes = incident.work_notes + "Hello World"

      ( or its alternative using the += operator)

      Because that is doubling the content and can kill access to the incident ..

      1. Jorden Van Bogaert

        Hi Francis


        Thanks a lot! It is that simple (big grin)

        The warning on the "+" operator in the documentation scared me into trying anything with the work_notes entity at all. (tongue)


        Thanks again!

      2. Francis Martens (Exalate)

        The warning is because things can really go wrong.

        Let me know how it goes

      3. Jorden Van Bogaert

        Worked like a charm, thanks a lot!

      CommentAdd your comment...