attachment.uploaded event triggering and subsequent scripting

verdakosnett
Tera Expert

I have form on which i track who uploaded what attachment as in the screen capture below:

find_real_file.png

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:

find_real_file.png

I then wrote a business rule:

find_real_file.png

and nothing happened....Where did I go wrong?

1 ACCEPTED SOLUTION

Yes as chuck mentioned, it should be an after BR. What is the field type of attachment_links and is it a custom field ?


View solution in original post

23 REPLIES 23

Chuck Tomasi
Tera Patron

A business rule only runs when a database action takes place. You may be looking to use a Script Action (a script that is triggered by an event.)



http://wiki.servicenow.com/index.php?title=Script_Actions


Script Actions - Business Rules' cousin


Hi Chuck,


Thanks for the response, my research shows your answer has potential but without any examples in the wiki, I am not sure how to make it work. Could you provide a quick example where a file upload updates a field on the record where the upload took place?


Kalaiarasan Pus
Giga Sage

You have a sample here of how you can do this via a business rule



Attachments


Thanks for your example. Yes, I can manipulate attachments on submit. Easy!! But, that is not what I am looking for. I need to be able to trigger an event when a file is dragged to the paper clip without a submit button and change a field value subsequently.