Siebel Object Interfaces Reference > Interfaces Reference > Application Methods >

GetSharedGlobal Method

Shared global variables are unique to the user and the user's associated session. One user's global variables are not visible to other users. The variables are global to the current user and session only. The GetSharedGlobal method gets the shared user-defined global variables.





String literal or variable containing the name of the global variable


A string containing the user-defined global variables.



retrieves the string set by:

SetSharedGlobal "varName", "stringValue".

Used With

COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script


In the following examples, the GetSharedGlobal method is called to get a global variable called myGlobalVar. The global variable was originally set using the SetSharedGlobal in Application_Start event. The global variable can be accessed from any event. For these examples, in the BusComp_WriteRecord event, the GetSharedGlobal method is called to retrieve myGlobalVar.

The following example is for COM. SiebelApplication is an Application instance.

Dim sReturn as String
oleVar = SiebelApplication.GetSharedGlobal("myGlobalVar", errCode)
SiebelApplication.SetSharedGlobal "myGlobalVar", " helloworld", errCode

The following example is in Siebel eScript:

function Application_Start (CommandLine)
   TheApplication().SetSharedGlobal("myGlobalVar", "helloworld");

function BusComp_WriteRecord ()
   var myVar;
   myVar = TheApplication().GetSharedGlobal("myGlobalVar");

The following example is in Siebel VB:

Sub Application_Start (CommandLine As String)
   TheApplication.SetSharedGlobal "myGlobalVar", "helloworld"
End Sub

Sub BusComp_WriteRecord
   Dim myVar as String
   myVar = TheApplication.GetSharedGlobal("myGlobalVar")
End Sub

See Also

SetSharedGlobal Method

Siebel Object Interfaces Reference