How to fetch reference field data in catalog client script or in script include

Ulka1
Tera Contributor

Hi Expertise,

I need to fetch reference field(like caller) data such as location which is stored in sys_user table and then I have to use this location in catalog client script. so please could anyone suggest me how to achieve this one. I tried getReference method but it is not working.

Awaiting for your response.

Thank You,

Ulka

 

 

 

22 REPLIES 22

Thanks Imran for the help. I will try this one and let you know.

But before that please guide me for below scenario.

The requester_for variable which u have taken in the RP it is edit mode so user has to select here.

 

But in my case i need to fetch caller field location automatically on the screen and then depending upon this location value i have to set other field(contact Tracing field) value.

R u getting my scenario, please let me know.

Imran Ahmad1
Kilo Guru

Do you mean After the RITM form gets load the caller field is auto populating with the logged in user name?

 

If yes then remove the isloding from the client script codition so onChange() act as onload as well.

Make change :

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}

Make it like this:-

function onChange(control, oldValue, newValue, isLoading) {
if ( newValue == '') {
return;
}

 

Regards,

Imran Ahmad

 

let me explain:

At backend, There is one HR form where the subject person reference field (sys_user) is present. here on the form itself i created 'Contact Tracing' choice field with stwo values which are 1. 'Contact Tracing required and 2.'Contact tracing not required'. These valuea get populated according to the subject person's location (i have implemented it through client script and BR ). Now the issue is that i have to populate the same value (for ex. value is 'contact tracing required') which shows in 'Contact Tracing' field on the record producer's "Contact Tracing'variable.( on the record producer i have created variable 'Contact Tracing').

Hope , now you will understand the requirement.

 

Note: The HR case record gets added or created using transmap.(that is by loading the data). not manually