Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

worknotes not updating in agent workspace

suresh kaliappa
Tera Expert

Hi All , 

 

My requirement is in agent workspace. there is one ui action called create incident. the purpose of the ui action button is to open a new incident form window along with some data copied to the fields like. description , short description , categories and sub categories etc. Now i want to add a worknote with the data present in 1 of the field. but the api "current.work_notes.setJournalEntry(current.transcript.toString);" is not working in ITSM workspace application scope. 

So can someone please help me how to achieve this in agent workspace. 

 

2 REPLIES 2

Amit Gujarathi
Giga Sage
Giga Sage

HI @suresh kaliappa ,
I trust you are doing great.
Please find the below reference code

// Add worknote to the 'current' record
current.comments = "Your worknote text here";
current.update();

// Open the new incident form with predefined data
var url = "/incident.do?sys_id=-1&action=insert&...";
action.setRedirectURL(url);

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



This does n't works in ITSM workspace application scope.