MRVS on load Not fetching its own value from g_form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 03:39 AM - edited 11-09-2023 04:03 AM
Hello Experts,
I'm stuck in a situation where i've a mrvs backend name "isp" i wrote a small on load catalog client script inside that mrvs that will fetch the value of its own at on load,
it has two record already but its not fetching those records i want that when i click to "add" button in mrvs
then this on load should trigger and bring me that mrvs array
'[{"id_isp":"ISP02139- 1","isp_component_type":"Primary"},{"id_isp":"ISP02139- 2","isp_component_type":"Secondary"}]'
this is the output of that mrvs i expect in alert where it has two records.
and this is the script i'm trying to fetch
function onLoad() {
alert('test');
alert(g_form.getValue(JSON.parse(g_form.getValue('isp'))[0].isp_component_type));
}
this is my catalog client script on mrvs
please help me in this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 03:14 AM
The value of the MRVS acts like a main record producer variable, so since you are in a MRVS you access those the same way
alert(g_service_catalog.parent.getValue('iata'));