Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Business Rule to populate the Field values From Another Field Through Reference Field

sekhar6
Tera Contributor

Hai,

Need a help in creating business rule. I am new to service now .kindly help on this script.

I Have an Customer Field On the form ,I have taken Reference table in Customer Field, If I Select The Customer Field, Display the Customer Name field and Multiplier Field  

image

 I Was Trying This Script ,Using Business Rule.

var gt = new GlideRecord('u_ln_customers');
gt.addQuery('u_ln_customers', current.u_customer);
gt.query();

 

if('u_customerISNOTEMPTY');
{}

 

if(gt.next()){}

 

current.u_ln_customers_u_customer_name =gt.u_customer.u_cname;

 

current.u_ln_customers_u_multiplier = gt.u_customer.u_multiplier;

image

 image

12 REPLIES 12

@sekhar

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@sekhar

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@sekhar

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader