How to get client scripts on record producer to apply on variable editor of target record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 11:45 AM
Hello, I have some client scripts on my record producer. One of them is an onLoad script that sets a global client variable:
function onLoad(){
this.my_g_form = g_form;
}
My target record has a variable editor from where I can access the fields submitted in the record producer. For a certain field, that uses my_g_form, the target record cannot seem to find with my_g_form is and throws an error. I checked both the Applies on a Catalog Item view and Applies on Target Record checkboxes, but it still throws the error. I was wondering if there was anything I could do to make this work on my target record.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 12:41 PM
What is my_g_form? That does not seem to be valid code. Why not just use g_from?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 01:25 PM
Its a global variable. I have a multi row variable set in which I have another client script. That client script calls a variable outside of the the variable set. I wanted to be able to access a variable outside of the multi row variable set, which is why I created a global variable called my_g_form.