Change variable set display title on onload client script
This content was last updated in 2019. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2019 02:41 AM
I am using a variable set on my catalog item which has display name 'Vendor Employee Details' , i don't want to display this title on my catalog item, instead i want it to be 'Employee Details'
How can i change this using a catalog client script ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2019 02:56 AM
Hi,
You can use this piece of code in your client script:
g_form.setLabelOf('field_name',"Employee Details"); //field_name is the dictionary name of Vendor Employee Details
Regards,
Munender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2019 03:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2019 03:11 AM
I have tried it but no luck, is 'field' referring to the internal name of the variable set ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2019 04:20 AM
It seems to be for variables. I have tried the following with variable set and it works
function onLoad() {
var doc_elem = document.getElementById('label_' + g_form.getControl('test_set_va').id);
doc_elem.innerHTML = 'NEWWW LABELL';
}
The field would be the internal_name of the variable set
PS - make sure the isolate_script is set to 'false'