moving images with update sets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 06:26 AM
I am working on a service catalog. When I add both images and icons to my catalog items and migrate my update sets to another instance, I don't see the images and icons on the service catalog in the new instance. What could I be doing wrong?
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 06:33 AM
Hi,
I know earlier releases had this issue and I thought it was resolved in later issues. What release are you using?
In any case, you can always force meta data such as incidents, attachments, etc (anything that isn't normally captured) in to the application or update set by using the "Add Application File" from the list menu. Choose there records from sys_attachment, then select the option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 06:37 AM
I am using Fuji.
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2016 07:45 AM
Hi Zack,
You may find below thread as helpful.
Re: How might I transfer Service Catalog Item Icons/Images from Dev -> Test?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2021 09:24 PM
I know i am late responding to this post but just in case anyone else is still looking for moving images associated with Hardware Catalog items(or any catalog item) with an update set then it can be done using the script below.
Essentially the steps are:
- Query the sysId of the catalog items for which you want images captured in an update set
- Search sys_attachment table with the sysId of catalog item. Note that images associated with catalog items are stored in sys_attachments and sys_attachment_doc table
- Save the attachment record in update set.
//Query for the CMDB Model record
var grModel = new GlideRecord('pc_hardware_cat_item');
grModel.addEncodedQuery('active=true^sys_class_name=pc_hardware_cat_item');
grModel.query();
while (grModel.next()) {
//gs.log(grModel.sys_id);
queryAttachments(grModel);
}
function queryAttachments(modelGR) {
//Query for the record
var rec = new GlideRecord('sys_attachment');
rec.addQuery('table_sys_id', modelGR.sys_id);
rec.query();
while (rec.next()) {
gs.log(rec.sys_id);
addAttachmentToUpdateSet(rec);
}
}
function addAttachmentToUpdateSet(attachmentGR) {
var um = new GlideUpdateManager2();
um.saveRecord(attachmentGR);
var attdoc = new GlideRecord('sys_attachment_doc');
attdoc.addQuery('sys_attachment', attachmentGR.sys_id);
attdoc.orderBy('position');
attdoc.query();
while(attdoc.next()){
um.saveRecord(attdoc);
}
}
Once you move the update set from source instance to destination instance, dont forget to clear server cache and your browser cache before retesting.
Please mark this helpful/correct if you find the information useful.