work_notes values is coming empty while trying to create an Incident using Glide Record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 08:19 AM
var gr = new GlideRecord('incident');
gr.initialize();
gr.short_description='Ticket Account' ;
gr.caller_id=workflow.scratchpad.userFullName;
gr.location=workflow.scratchpad.userLocation;
gr.work_notes='This is a high-priority incident.' ;
gr.insert();
gs.addInfoMessage('Ticket Created');
Here is my script which I have written in a workflow to create a ticket . Everything is getting inserted except the work_notes
Please help out !
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 08:38 AM
Hi Garg,
current.work_notes.getJournalEntry(-1);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 01:14 PM
hey midhun,
i am very new to this .
current.work_notes.getJournalEntry(-1);
is this like creating a variable first and where can i add my data ?
thanks in advance .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 08:40 AM
Are you sure? The work_notes field is a special type of field called Journal (Using Journal Fields - ServiceNow Wiki) which always appear empty on a form. They are meant to allow users to enter new journal entries, and do not necessarily display the contents of the field.
Check the Activity formatter on the Incident form to see if your work note appears there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 08:53 AM
Here's a screenshot to show you what happens with Journal fields:
The field itself is blank, but the previous entries appear in the Activity formatter, which may or may not be near the Work notes field. Here's some information on the Activity formatter - Activity Formatter - ServiceNow Wiki