Bulk Updation of catalog items
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2015 07:37 AM
Hi All,
We have around 1500 catalog items under service catalog. I need to update the picture corresponding to each catalog item now.Is there any way to update the picture for these items at one go rather than manually opening each catalog item record and updating the picture?
Regards,
Ravi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2015 08:42 AM
When we update massive amounts of records, we generally use the Scripts - Background feature from the left hand menu (you have to elevate your security privileges to see it). This allows you to execute your javascript commands directly on things.
I have never done an update involving the picture of an item, however from doing a quick test it appears that the images stored in Pictures are stored in the sys_attachment table. Therefore, it seems that you should be able to upload the images into the attachment table (and quite frankly, this could be done via email, etc. since any method that stores attachments to sys_attachment will do). Once the images exist in the attachment table you just need a way to change their reference and point it to your catalog item (Scripts - Background would do well at this).
We have redirected attachments before, so I do not see why this would be a problem with attachments. You will just need to play with it a little to get the syntax right.
Hope that points you in the right direction. Perhaps someone can help with a better way of a mass upload to sys_attachment, but I know even the rudimentary way of just emailing them in would work and allow you to maintain their file names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2015 02:33 AM
Hi Ravishankar,
You can use schedule job or background script to achieve this.
example:-
- var gr = new GlideRecord("cmdb_ci");
- gr.addEncodedQuery("active=true");
- gr.query();
- while (gr.next()) {
- gr.u_operational_status = archived;
- gr.update();
- }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2021 11:17 AM
Hello,
Can we update bulk catalog items based on description contain similar word?
ex: If description contains 'XYZ', replace 'XYZ' with 'PQR' for all the catalog items