- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2020 10:30 AM
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.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 07:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2020 10:52 PM
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
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 07:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 07:21 AM