A custom UI action called "Create Incident" was set up on Service Request record. When user clicks on "Create Incident" UI Action, an incident record was created out of service request with a comment saying "Created from: SRQXXXXXX". 

But this comment was repeated twice when an incident was created from "Create Incident" UI action.


Any supported release.


Custom UI Action "Create Incident" referred a custom script include which populated a comments field as below and then this comments variable is passed to url parameter to create incident record.

var comments = "Created from: "+record.number+'\n'+record.comments;

The line breaks within the "comments" journal field is causing the system to interpret there are 2 entries for comments field and hence inserts comments field twice on the sys_journal_field table. Thus eventually shows up twice on the activity stream.


Modify comments assignment line so that it doesn't have newline character in between as below, ( use space as separator instead of newline)

var comments = "Created from: "+record.number+' '+record.comments;

Additional Information

UI Action

Script include

Article Information

Last Updated:2019-05-21 11:47:02