- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 08:41 AM
Hello everyone,
I need to copy the Description field on the Catalog Item form to the related RITM. I tried to write a BR after insert on the Catalog Item table
but it does not do any good.
Any help is appreciated.
Thanks in advance.
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', current.request_item);
gr.query();
if(gr.next()){
gr.description = current.short_description;
gr.update();
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 09:12 AM
This did not work yet.
But , I found an alternative approach for my requirement, although it is not perfectly what it should be.Just a workaround.
I found the short description of the catalog is mapped to short description of the RITM, so i remapped this (from RITM) to the detailed description of the RITM in a run script of the workflow of the SC instead of the BR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 08:49 AM
I think the issue may be that current.short_description is the RITM, not the Catalog Item. Not sure, but I would try replacing:
gr.description = current.short_description;
with:
gr.description = current.cat_item.short_description;
Edit: since your latest post identifying it's actually the description field you are after, I'm wondering if the fact it's a HTML field will be an issue. See: GlideRecord HTML field to Plain Text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 08:57 AM
Thanks. Just tried and didn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 09:02 AM
Perhaps get from the variable instead of current..?
gr.description = gr.cat_item.short_description;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 09:12 AM
This did not work yet.
But , I found an alternative approach for my requirement, although it is not perfectly what it should be.Just a workaround.
I found the short description of the catalog is mapped to short description of the RITM, so i remapped this (from RITM) to the detailed description of the RITM in a run script of the workflow of the SC instead of the BR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 08:58 AM
Oh my Bad , sorry. Copying Short_Description of the Catalog form to RITM Detailed Description