On Change Client script Caller or Requested for

Devi16
Tera Contributor

Hi Forum,

Thanks in advance,

Currently I am working on some record producer and dealing with on Change client script.

I have to do something like this

On record producer we have two fields 1 caller (read only) and 2 requester so whenever form loading we are displaying caller related user info in the other variables and if user select the requester field we are populating the user information based on requester field, now if user clear the values from requester field we have to display caller field user information.

How to achieve this. 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi,

 

On the client script, have you set the 'UI Type' to All?

 

find_real_file.png

View solution in original post

7 REPLIES 7

Community Alums
Not applicable

Hi, Can u change/check 3 things-

 

1. In Script Include, after every getUser.fieldname add the text '.toString()'. Ignore where getDisplayValue() is used.

Example:

userArr.employee_id = getUser.user_name.toString();
userArr.title = getUser.title.toString();
userArr.cost_center = getUser.cost_center.getDisplayValue();//This is correct
userArr.station_id = getUser.building.getDisplayValue(); //This is correct

 

2. You have not returned anything in your Script Include. Add the line 

'return JSON.stringify(userArr);' //Add the text 'return'

 

3. Ensure you have set "Client Callable" to true in your script include

find_real_file.png

 

 

If even after doing the above 3, if you are still facing any issue- Can you send screenshots of all the logs so that we can check where the logic is breaking for you?

Thanks for help, 

When I am opening and Record Producer form its working as expected, but where as on portal site same form not working, what will be cause.

Only caller field getting populating,

find_real_file.png

 

Community Alums
Not applicable

Hi,

 

On the client script, have you set the 'UI Type' to All?

 

find_real_file.png