Declaring a Global Variable
This topic describes how to declare a global variable.
To declare a global variable
Open the Siebel Script Editor for the object you must modify.
For more information, see Opening the Siebel Script Editor.
Use the Global statement to declare the variable.
The following example includes the Global statement in Siebel eScript:
TheApplication().gVar = "some value";
Repeat these steps for each object that must access the value of the global variable.
Do Not Use a Global Variable to Reference a Siebel Object
Do not use a global variable to reference a Siebel object, such as a business component or business object. If you must reference a Siebel object, then set the global variable to Nothing when you no longer require the object, or in the Application_Close event.
If you do not set the variable to Nothing, then a memory problem might occur. Siebel CRM cannot release from memory the object that the global variable references until the variable no longer references the object. If you must create a global variable for a business component, then make sure a global variable for the business object exists.
For more information, see Application_Close Event.