How to update parent record using business rule

Sai25
Giga Guru

Hi All,

I have created a after business rule. When change is created need to update the change record in the under parent field in release table.

below is the script.
var gr=new GlideRecord('rm_release');
gr.addQuery('change_request',current.sys_id);
gr.query();
if(gr.next()){
gr.parent=current.sys_id;
gr.update();
}

find_real_file.png

Thank You,

Sai.

 

12 REPLIES 12

what is your exact requirement ? do you have change request available on rm_release table record ? 

 

script would be like 

 

var gr=new GlideRecord('rm_release');
gr.addQuery('parent',current.sys_id);
gr.query();

gs.log(' Row count is '+ gr.getRowCount());

Hi Harsha,

When record is inserted in change table parent  should be populated with release record and in release table parent should be populated with change record.

Hi Harsha,

 

Row count is 0