Trying to copy picture field to icon field in sc_catalog_item table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 05:24 AM
i am trying to copy picture field to icon field in sc_catalog_item table.
i have written below script but it is not copying all the catalog item, some were left.
var picUpdate = new GlideRecord("sc_cat_item");
picUpdate.query();
while(picUpdate.next()){
var copy = picUpdate.getValue("picture");
picUpdate.icon = copy;
picUpdate.update();
}
suggest me something that i have to add in the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 07:32 AM
Hi @Faizan Haider ,
It could be worth verifying the value on the "checked out" field, if the value is true for this field you won't be able to modify it from your script. If that is the case, you'll need to go to the item and click on 'cancel check out'.
If that helps please mark my answer as correct / helpful!
And if further help is needed please let me know
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 09:05 AM