Just wondering what’s best practice for storing global variable and global function in Maestro framework?
I need to define a global variable say “adobeSignAgreement” that could share across multiple components. Also I want to define a global function “adobeSignGenerateToken()” in one of the component so other component can call that too.
Currently I can think of putting adobeSignAgreement as window.adobeSignAgreement or data.$adobeSignAgreement (I remember that $ sign means it will not be part of the submission data).
What’s best practice for this?
Also for the global function, what’s the best place to create? Still attached to window object or some other Maestro object?
There are issues with using the Maestro data object to store non-Maestro data. Even when using the "$" naming convention. While only Maestro fields will be used to create the submission data, there is code that scans thru every element of the data object, and in certain circumstances problems can occur.
Better practices are to add any custom global variables or functions to the window object, and to not modify Maestro objects for these purposes.