March 2017
Beginner
358 pages
9h 51m
English
Here, we begin by declaring our GlideRecord object, initializing it on the Incident table, and setting a few values.
When we call the setValue() method on lines 3 and 4, we populate a GlideElement object property within the GlideRecord object, corresponding to the field specified in the first argument of the setValue() method call. We set the value to the value specified in the second argument of the setValue() call:
var gr = new GlideRecord('incident'); gr.initialize(); gr.setValue('short_description', 'Example record'); gr.setValue('description', 'This is a test.'); gr.insert();
Finally, on line 5, we call the insert() method, which pushes the GlideRecord object to the database, at which point a new record is created with ...
Read now
Unlock full access