Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Capturing attachments in update sets

paradise624
Tera Contributor

Hi Everyone!

Question: What is the best way to capture an attachment in an update set? Also will the sys_id of the attachment change once its in a different environment?

5 REPLIES 5

Maik Skoddow
Tera Patron
Tera Patron

Hi @paradise624 

you are right. For example if you select an image for a catalog item, that image is not captured automatically in an Update Set.

There are code examples how to push attachments to an Update Set, but it is easier to use the "Add to Update Set" feature (load it from https://developer.servicenow.com/connect.do#!/share/contents/9824957_add_to_update_set_utility)

Having that feature activated in your instance you can go to sys_attachment table, select the required attachments and the trigger the "Add to Update Set" action:

find_real_file.png

Kind regards
Maik