Display a value from company table on a Record producer

cstangoe
Mega Guru

Evening all.

 

I have a field called 'u_core' which sits on the company table the value differs for each company. I wish for this value to automatically display on a record producer when a caller is submitting an incident.

 

What is the best why to achieve this?

 

 

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

I'm assuming you have a company variable that you are populating, or want the u_core from the company related to the caller?  For whichever field/variable is changing, you can create an onChange Catalog Client Script that uses getReference to return the u_core of the company.

https://docs.servicenow.com/bundle/tokyo-application-development/page/app-store/dev_portal/API_refer... 

 

If it's the company related to the caller, or another step removed like that then you'll need the script to call a Script Include via GlideAjax instead. 

https://www.servicenow.com/community/developer-articles/glideajax-example-cheat-sheet-updated/ta-p/2... 

 

You could also see if the code-less approach will work in this scenario

https://www.servicenow.com/community/developer-articles/catalog-data-lookup-definition-on-any-table-... 

 

The good news is that starting with the Utah release, there is a new feature on variables to easily populate them based on the value of another variable.

View solution in original post

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

I'm assuming you have a company variable that you are populating, or want the u_core from the company related to the caller?  For whichever field/variable is changing, you can create an onChange Catalog Client Script that uses getReference to return the u_core of the company.

https://docs.servicenow.com/bundle/tokyo-application-development/page/app-store/dev_portal/API_refer... 

 

If it's the company related to the caller, or another step removed like that then you'll need the script to call a Script Include via GlideAjax instead. 

https://www.servicenow.com/community/developer-articles/glideajax-example-cheat-sheet-updated/ta-p/2... 

 

You could also see if the code-less approach will work in this scenario

https://www.servicenow.com/community/developer-articles/catalog-data-lookup-definition-on-any-table-... 

 

The good news is that starting with the Utah release, there is a new feature on variables to easily populate them based on the value of another variable.