How to get value from a reference field and copy it to the another reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 03:17 AM
Hi All,
I have a catalog item and have two reference fields, I have to get value from one reference field and copy that value to another reference field. I have tried the below script but it;s not working for me, Please suggest me the correct way here.
I have used Onload client script here...
function onLoad() {
var manager = g_form.getValue('Requesters_Manager');
alert(manager);
g_form.setValue('Resource_Manager',manager);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 04:06 AM
Hi Divya,
I have written the below Onload client script and is working fine now..Thank you so much for your help and quick response
function onLoad() {
//Type appropriate comment here, and begin script below
if(g_form.getValue('requesters_manager') !== ''){
var manager = g_form.getValue('requesters_manager');
//alert('manager');
g_form.setValue('resource_manager',manager);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 04:07 AM
Kindly mark it as correct answer, if helpful for the sake of community users to know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 03:35 PM
Hi Divya,
This question was marked as discussion, How can I make this as question as I am unable to mark it as crorect answer now