on change client script is not working on service operations workspace

suryaogeti1
Tera Contributor

on change client script is not working on service operations workspace

I need to auto populate the location, when caller is selected, but it is not working, please help me with this

function onChange(control, oldValue, newValue, isLoading) {
   if ((isLoading && !g_form.isNewRecord()) || (g_form.isLiveUpdating && g_form.isLiveUpdating()))
      return;

   if (newValue == '' || newValue == null) {
      g_form.clearValue('location');
      return;
   }
   if (!g_form.hasField('location'))
      return;
   var caller = g_form.getReference('u_caller', setLocation);
}

function setLocation(caller) {
   if (caller && caller.location)
       g_form.setValue('location', caller.location);
}
2 ACCEPTED SOLUTIONS

Hi @suryaogeti1 ,
under view name select service operations workspace new record and make changes there
Screenshot 2026-04-14 at 8.37.48 PM.png

View solution in original post

Hi @suryaogeti1 ,
1.Right click on form header, Configure >> form builder.
Screenshot 2026-04-14 at 9.21.42 PM.png

2.Select the view and scroll down to see the section you want to delete
Screenshot 2026-04-14 at 9.20.26 PM.png
3.Click on the trash icon to delete the section
4.Now click on save(top-right corner)

View solution in original post

12 REPLIES 12

HI @suryaogeti1 ,
On Interaction we don't have a caller field instead we have opened for (opened_for)
so try replacing u_caller with opened_for

Hi @suryaogeti1 ,
replace the caller_id with opened_for.
The Client script Configuration should be as below:Screenshot 2026-04-14 at 8.12.34 PM.png


client script:

function onChange(control, oldValue, newValue, isLoading) {
   if ((isLoading && !g_form.isNewRecord()) || (g_form.isLiveUpdating && g_form.isLiveUpdating()))
      return;

   if (newValue == '' || newValue == null) {
      g_form.clearValue('location');
      return;
   }
   if (!g_form.hasField('location'))
      return;
   var caller = g_form.getReference('opened_for', setLocation); //change is made here
}

function setLocation(caller) {
   if (caller && caller.location)
       g_form.setValue('location', caller.location);
}



 

Hi @Rakesh_M ,

suryaogeti1_1-1776178734065.png

 

suryaogeti1_3-1776178766385.png

suryaogeti1_4-1776178833120.png

please help me with this

Hi @suryaogeti1 ,
under view name select service operations workspace new record and make changes there
Screenshot 2026-04-14 at 8.37.48 PM.png

Hi @Rakesh_M 
thank you so much and one more query, here how can we remove the entire section 'cause',i can only able to remove the fields not the entire section name

suryaogeti1_0-1776179898023.png