How to set a work note in a UI action?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
I created a client UI action that would a open new change request on press, however I noticed that if I try to set a work note during the creation - the script completely breaks and no record is created. No error is outputted either when i go to system logs.
var change = new GlideRecord("change_request");
change.initialize();
change.short_description = "Test";
change.description = "Test Description";
change.work_notes = "Test Note"; // Ticket is created if this line is commented out
change.insert();My goal is to create a work note that would be a copy of the description. I can accomplish this through a business rule, but that is overkill and I feel like I should be able to do this with one line of code in the action itself.
What's the proper way to set a work note in a UI action?
0 REPLIES 0