
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 10:39 AM
Hello SN Community!
So, I've created a custom table which stores field1 and the associated field2 value to be used on a Service Portal page. Now, I'm trying to a use the value that the user selects for field1 to get and display the value of field2. What is the best way to do this in an onChange client script? I'm looking for best practices and possible samples, please....
Thanks in advance!
Maria.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 11:06 AM
Hi Maria,
Write an onchange Client script on field A;
Use g_form.getReference('field_name',callback) to get the server side value.
Update field_2 from the custom table field name which stores (111) value and feild 2 in which you need to stores.
var g = g_form.getReference('fieldA',callback);
function callback(a){
g_form.setValue('field2',a.field_2);//Update field_2 with the field which stores 111 in yourcustom table
}
Mark helpful and correct if it helps.
Thanks,
CB

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2020 10:13 AM
I got it to work, CB! Thanks! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2020 05:36 AM
I recommend you to use glideAjax for this for calling script include via client script on the onChange event.
Thanks
Sudhanshu