Change the Field Label Dynamically

Himesh Murthy
Tera Contributor

Hi, 

 

I was able to change the field label dynamically on the form view using onLoad Client script but the same isn't working when the record is previewed in the list view

 

Form view - This works as expected

HimeshMurthy_0-1739289786680.png

 

List View - This doesn't work. The view used here for preview is Sys_popup 

 

HimeshMurthy_2-1739289892966.png

 

The Script that I've used - 

 

function onLoad() {
    //Type appropriate comment here, and begin script below
    if (g_form.getValue('caller_id') == '6816f79cc0a8016401c5a33be04be441') {
        g_form.setLabelOf('short_description', 'shortDesc');
       
    }
}
 
Is there anything else that I must do for this functionality to work during the preview? Any help here would really be appreciated. Thanks
1 REPLY 1

jcmings
Mega Sage

Not sure if it's possible. There is an article on how to modify the sys_popup view here: Customize the Reference Icon Pop-up 

 

Edit to add - does a client script doing a g_form.setLabelOf that runs on the sys_popup view not work?