- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2016 03:07 PM
I have form on which i track who uploaded what attachment as in the screen capture below:
This works fine as long as the form is submitted but obviously it is no good if a user drags a file to the form. So, I registered an event as follows:
I then wrote a business rule:
and nothing happened....Where did I go wrong?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2016 07:42 AM
Yes as chuck mentioned, it should be an after BR. What is the field type of attachment_links and is it a custom field ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2016 11:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2020 05:38 AM
Hi ,
I tried with the same approach as mentioned above but the business rule is not fired. I want to update incident when attachment is updated corresponding to incident record.
(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);
condition = current.table_name == "incident"
Operation : After Insert/Update
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2016 12:53 PM
Glad you got this working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2018 04:51 AM
There is an Attachments Related List that provides very similar functionality, and doesn't require additional logic to manage the entries in a separate table (for example if an attachment is removed from the incident / task, it will still show in the history table you have.
I realise this is responding to an old post, but you may want what is possibly a simpler solution, that has no technical debt.