Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to get parent table fields in child table business rule.

Tippireddy Venk
Tera Contributor

I'm working on sc_task business I want to get sc_req_item table cat_item field value sc_req_item is parent table of sc_task.

 

1 REPLY 1

AnveshKumar M
Tera Sage
Tera Sage

Hi @Tippireddy Venk 

You can dot walk like this.

var cat_item = current.request_item.cat_item + '';

 

This will get you sys_id of the cat_item.

 

If you want the name, you can dot walk like,

var cat_item_name = current.request_item.cat_item.name;

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

 

Thanks,
Anvesh