Why setLabelOf() function is not allowing below code to run in the onload script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2024 11:28 PM
Hii All,
My question is about related to the setLabelOf() function, As i came across that i have used setLabelof() for one field to relabel it then it worked but below code was not running then i commented the code of setLabelof() then below code was running fine, Can i know what is the reason why it is happening like that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 12:50 AM
Hi @Apoorva A H ,
Please check below code
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setLabelOf('description', "label name");
var view = getView();
if (view == 'my_new_view') {
alert(view);
g_form.setVisible("active", true);
g_form.setVisible('priority', false);
}
}
I gone with documentation of client scirpt api, mentioned as instead of setDisplay or setVisible method you can create UI Policy for that
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 01:01 AM
Hi @Apoorva A H ,
Can you please mark my answer correct if this works for you
Thanks and Regards
Sarthak