The CreatorCon Call for Content is officially open! Get started here.

Populating the RITM Category with Catalog task category.

kirthi1
Tera Contributor

Populating the RITM Category with Catalog task category.

I am looking to see if there is a possibility to populate the Category on the RITM with the Category on the Catalog task.

These are 2 independent fields and we did not have the requirements initially to have category on the RITM level and now the Category on RITM is important requirement.

Any help is appreciated. 

 

8 REPLIES 8

you need to select the update check box as well.

Also please add the filer condition if you need to run this on update as well.

Just use Field: Category - Operator: changes

Vanashree Kubal
Kilo Guru

Hey Hi Kirthi,

Check this code inside after business rule. I think this will fulfill your requirement.

find_real_file.png

find_real_file.png

Code Snippet:-

    var category = current.u_category.title;
    var refKey = current.request_item;
    
    var grItem = new GlideRecord('sc_req_item');
    
    grItem.addQuery('sys_id', refKey);
    grItem.query();
    
    grCat.addQuery('sys_id', current.u_category.sys_id);
    grCat.query();
    
    if(grItem.next())
     {   
            grItem.u_category = current.u_category.sys_id;
            grItem.update();             
    }
  
   

Please marked my answer as correct or helpful.

Thanks,

Vanashree Kubal

Hey Hi Kirthi,

Let me know you have any query related to answer or you are satisfied with it.

 

Please marked my answer as correct or helpful.

Thanks,

Vanashree Kubal

 

mahesh_vavilal1
Tera Contributor

You should be careful posting screenshots with real data from your organization.

With regards to your requirement, this is just data duplication and not a good practice.