AutoPopulate fields on a form

Afzal Gul
Tera Contributor

Hello All,

I have a requirement to auto-populate fields (org_ap, p_tech_ap, po_a, o_a, p_ta) on contract_partner table's form when field u_partner is changed based on if a record with similar value (u_company) already exist in customer_inforamtion table. The u_partner field and u_company are both reference fields (core_company). 

How can I achieve this.. ?

 

Thanks

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Afzal Gul 

you can use onChange client script with getReference callback or GlideAjax for this

what did you start with and where are you stuck?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Ankur Bawiskar Thanks for your response. I tried GlideAjax and Business Rule I am not getting any values. As I see both u_partner and u_company fields are reference fields to core_company but I can not figure it out with sys_id. 

Can you please guide me please..

@Afzal Gul 

please share your script include and client script

why did you create Business rule?

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

Attached is my client script and script include