We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to update parent record using business rule

Sai25
Tera 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