- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2020 05:46 AM
condition = current.table_name == "incident"
When to run : After Insert/Update
(function executeRule(current, previous /*null when async*/ ) {
var gr = new GlideRecord("incident");
gr.addQuery("sys_id", current.table_sys_id);
gr.query();
gs.log("===>record exists", gr.next());
while(gr.next()) {
gs.log("===>record glide", gr);
//fi = gr.getElement('isAttachmentUpdated');
gr.setValue('isAttachmentUpdated', 'Updated'); //custom field isAttachmentUpdated
gr.update();
}
// Add your code here
})(current, previous);
Note: I'm able to receive the "record exists" debug as "true" but not able to get the log inside while loop. Please help me understand what is the issue fix as the custom field (isAttachmentUpdated) on incident is also not getting updated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2020 11:00 PM
Hello
If this has answered your question, kindly mark the comment as a correct answer so that the question is moved to solved list.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2020 11:00 PM
Hello
If this has answered your question, kindly mark the comment as a correct answer so that the question is moved to solved list.