File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Catalog Client Script/MRVS Interact With Parent Form Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
- Use the g_service_catalog . parent object to interact with the parent form from within a MVRS script
1
+ //These methods can be used onLoad, onChange, or onSubmit in a script that Applies to the MRVS
2
2
3
- //Retrieve a variable value from the parent form
3
+ //Retrieve a variable value from the parent form - works in native UI as well as Service Portal, etc.
4
4
g_service_catalog . parent . getValue ( 'variable_name' ) ;
5
5
6
- //Set a variable value on the parent form
7
- g_service_catalog . parent . setValue ( 'variable_name' ) ;
6
+ //With this approach, you can set a variable value on the parent form - use similar code for other g_form methods like clearValue
7
+ //Service Portal method requires an additional Catalog Client Script onLoad that Applies to the Catalog Item
8
+ if ( this ) { //Service Portal method
9
+ this . cat_g_form . clearValue ( 'variable_name' ) ;
10
+ } else { //native UI method
11
+ parent . g_form . clearValue ( 'variable_name' ) ;
12
+ }
You can’t perform that action at this time.
0 commit comments