Server-Side Global Variables

The Commerce Server Business Desk Framework defines the following server-side global variables:

ALLOW_CONTEXT_MENUS

A Boolean value that controls whether normal right-click menus will be disabled within Business Desk. A value of True allows normal right-click menus, and a value of False suppresses normal right-click menus.

In the Global.asa file, when the variable MSCSEnv is set to PRODUCTION, the variable ALLOW_CONTEXT_MENUS is set to False. When the variable MSCSEnv is set to DEVELOPMENT, the variable ALLOW_CONTEXT_MENUS is set to True.

There is also an Application object variable with the same name as this global variable.

AUTO_REDIRECT_ENABLED

A Boolean value that controls whether action pages can be displayed outside the Business Desk Framework. A value of True causes any such attempt to be redirected to Business Desk, and a value of False suppresses this redirection behavior.

In the Global.asa file, when the variable MSCSEnv is set to PRODUCTION, the variable AUTO_REDIRECT_ENABLED is set to True. When the variable MSCSEnv is set to DEVELOPMENT, the variable AUTO_REDIRECT_ENABLED is set to False.

There is also an Application object variable with the same name as this global variable.

FORCE_HTA_ONLY

A Boolean value that controls whether an attempt to run Business Desk outside of an HTML application (HTA) environment will result in an error being displayed. A value of True causes any such attempt to result in an error being displayed, and a value of False suppresses this error display behavior.

In the Global.asa file, when the variable MSCSEnv is set to PRODUCTION, the variable FORCE_HTA_ONLY is set to True. When the variable MSCSEnv is set to DEVELOPMENT, the variable FORCE_HTA_ONLY is set to False.

There is also an Application object variable with the same name as this global variable.

g_dActionPage

A reference to a Dictionary object containing the configuration information for the current page, such as the tasks associated with the action that the page implements.

The Dictionary object accessed through this global variable is created in the file ActionPageUtil.asp by calling the routine dGetAction. The scope of the variable is the action page itself.

g_imgInvalid

A string containing HTML that displays the icon used to indicate a value is not valid in edit pages.

g_imgLoadingAnimation

A string containing HTML that displays the loading animation icon.

g_imgRequired

A string containing HTML that displays the required icon used in edit pages.

g_MSCSAdminEventLog

A reference to an object (ProgID = Commerce.AdminEventLog) that provides a mechanism for writing errors to the event log. For more information, see AdminEventLog Object.

Do not call the Initialize method on this shared object.

The object accessed through this global variable is created and initialized in the Global.asa file, and its scope is Application.

g_MSCSAppConfig

A reference to an object (ProgID = Commerce.AppConfig) that provides a mechanism for reading application configuration values. For more information, see AppConfig Object.

Do not call the Initialize method on this shared object.

The object accessed through this global variable is created and initialized in the Global.asa file, and its scope is Application.

g_MSCSBizDeskRoot

A string containing the virtual root name for the current instance of Business Desk.

This variable is declared and initialized in the file BizDeskPaths.asp, and its scope is the action page itself. It is initialized to the value of the Application object setting the variable MSCSBizDeskRoot, which is read from the file Csapp.ini in the Global.asa file.

g_MSCSBizDeskSecurity

A reference to an object (ProgID = Commerce.BizDeskSecurity) that provides a mechanism for filtering the contents of the navigation frame based on the identity of the user. For more information, see BizDeskSecurity Object.

The object accessed through this global variable is created and initialized in the Global.asa file, and its scope is Application.

g_MSCSConfiguration

A reference to an object (ProgID = Commerce.SiteConfigReadOnly) that is instantiated with the site name and is used to retrieve site configuration information from the site store. For more information, see SiteConfigReadOnly Object.

Do not call the Initialize method on this shared object.

The object accessed through this global variable is created and initialized in the Global.asa file, and its scope is Application.

g_MSCSCurrencyLocale

The currency locale ID (LCID) from the Site Configuration Store.

This variable is declared and initialized in the file ActionPageUtil.asp, and its scope is the action page itself. It is initialized to the value of the Application object setting the variable MSCSCurrencyLocale, which is read from the site store in the Global.asa file.

The global variable g_DBCurrencyLocale, set in the file DBUtil.asp, contains the same value.

g_MSCSDataFunctions

A reference to an object (ProgID = Commerce.DataFunctions) that provides generic data functions, such as for data formatting and validation. For more information, see DataFunctions Object.

Do not reset the locale property on this shared object.

The object accessed through this global variable is created and initialized in the Global.asa file, and its scope is Application.

g_MSCSDefaultLocale

The default LCID from the Site Configuration Store.

This variable is declared and initialized in the file ActionPageUtil.asp, and its scope is the action page itself. It is initialized to the value of the Application object setting the variable MSCSDefaultLocale, which is read from the site store in the Global.asa file.

The global variable g_DBDefaultLocale, set in the file DBUtil.asp, contains the same value.

g_MSCSEnv

A number set to one of the server-side constants PRODUCTION or DEVELOPMENT.

Based on the setting of the MSCSEnv variable in the Global.asa file, the default values for the following global variables are established:

VERBOSE_OUTPUT

SHOW_OBJECT_ERRORS

AUTO_REDIRECT_ENABLED

FORCE_HTA_ONLY

ALLOW_CONTEXT_MENU

This global variable is defined and initialized in the file BizDeskUtil.asp. It is initialized to the value of the Application object variable MSCSEnv, which is set in the Global.asa file.

g_MSCSMessageManager

Contains a reference to an object (ProgID = Commerce.MessageManager) that provides a mechanism for retrieving user interface strings from a centralized location. For more information, see MessageManager Object.

Do not reset the DefaultLanguage property on this shared object.

The object accessed through this global variable is created and initialized in the Global.asa file, and its scope is Application.

g_mscsPage

A reference to an object (ProgID = Commerce.Page) that contains useful page helper functions. For more information, see Page Object.

The object accessed through this global variable is created and initialized in the file ActionPageUtil.asp, and the scope of the variable is the action page itself.

g_MSCSSiteName

A string containing the name of the site corresponding to this instance of Business Desk.

This variable is declared and initialized in the file BizDeskPaths.asp, and its scope is the action page itself. It is initialized to the value of the Application object setting the variable MSCSSiteName, which is read from the file Csapp.ini in the Global.asa file.

g_sActionId

A string that contains the Uniform Resource Locator (URL) path and query string of the current page, relative to the Business Desk root folder. This string is known as the Action ID. This value corresponds to the id attribute of one of the action elements in one of the module configuration files.

This variable is declared and initialized in the file ActionPageUtil.asp, and its scope is the action page itself.

g_sBDAssetRoot

A string containing the complete URL path to the Business Desk Assets folder where all shared images are stored.

This variable is declared and initialized in the file BizDeskPaths.asp, and its scope is the action page itself. It is constructed by appending the name of the assets folder ('Assets/') to the end of the string contained in the global variable g_sBizDeskRoot.

g_sBDConfigPath

A string containing the complete file system path to the Business Desk configuration folder where all Business Desk XML configuration files are stored.

This variable is declared and initialized in the file BizDeskPaths.asp, and its scope is the action page itself. It is the file system path equivalent of the virtual path specified by the global variable g_sBizDeskRoot.

g_sBDConfigRoot

A string containing the complete URL path to the Business Desk configuration folder where all XML configuration files are stored.

This variable is declared and initialized in the file BizDeskPaths.asp, and its scope is the action page itself. It is constructed by appending the name of the configuration folder ('Config/') to the end of the string contained in the global variable g_sBizDeskRoot.

g_sBDIncludeRoot

A string containing the complete URL path to the Business Desk include folder.

This variable is declared and initialized in the file BizDeskPaths.asp, and its scope is the action page itself. It is constructed by appending the name of the include folder ('Include/') to the end of the string contained in the global variable g_sBizDeskRoot.

g_sBizDeskRoot

A string containing the complete URL path to the Business Desk folder.

This variable is declared and initialized in the file BizDeskPaths.asp, and its scope is the action page itself. It is constructed by adding slash characters ('/') to the beginning and end of the string contained in the global variable g_MSCSBizDeskRoot.

g_sBizDeskRootPage

A string containing the complete URL path to the master start page of the Business Desk.

This variable is declared and initialized in the file BizDeskPaths.asp, and its scope is the action page itself. It is constructed by appending the name of the master start page (Bizdesk.asp) to the end of the string contained in the global variable g_sBizDeskRoot.

g_sMSCSCurrencyFormat

A string containing a currency format to be used as the data associated with the format element within a numeric element of the currency subtype in the meta-data for an HTML component (HTC).

This variable is declared and initialized in the file ActionPageUtil.asp, and its scope is the action page itself. It is initialized to the value of the Application object setting MSCSCurrencyFormat, which the Global.asa file reads from the site store.

g_sMSCSDateFormat

A string containing a date format to be used as the data associated with the format element within a date element in the meta-data for an HTML component (HTC).

This variable is declared and initialized in the file ActionPageUtil.asp, and its scope is the action page itself. It is initialized to the value of the Application object setting MSCSDateFormat, which the Global.asa file reads from the site store.

g_sMSCSNumberFormat

A string containing a number format to be used as the data associated with the format element within a numeric element of the integer or float sub-type in the meta-data for an HTML component (HTC).

This variable is declared and initialized in the file ActionPageUtil.asp, and its scope is the action page itself. It is initialized to the value of the Application object setting the variable MSCSNumberFormat, which the Global.asa file reads from the site store.

g_sMSCSWeekStartDay

A string specifying the first day of the week, to be used as the data associated with the firstday attribute of a date element in the meta-data for an HTML component (HTC).

This variable is declared and initialized in the file ActionPageUtil.asp, and its scope is the action page itself. It is initialized to the value of the Application object setting the variable MSCSWeekStartDay, which is obtained from the DataFunctions object using the site default locale.

SHOW_DEBUG_TEXT

A Boolean value that controls whether debug text is displayed during certain routines. A value of True causes the debug text to be displayed, and a value of False suppresses the display of the debug text.

In the Global.asa file, when the variable MSCSEnv is set to PRODUCTION, SHOW_DEBUG_TEXT is set to False. When MSCSEnv is set to DEVELOPMENT, SHOW_DEBUG_TEXT is set to True.

There is also an Application object variable with the same name as this global variable.

SHOW_OBJECT_ERRORS

A Boolean value that controls whether object loading errors are displayed in a dialog box upon completion of loading. A value of True causes the dialog box to be displayed, and a value of False suppresses the display of the dialog box.

In the Global.asa file, when the variable MSCSEnv is set to PRODUCTION, SHOW_OBJECT_ERRORS is set to False. When MSCSEnv is set to DEVELOPMENT, SHOW_OBJECT_ERRORS is set to True.

There is also an Application object variable with the same name as this global variable.

VERBOSE_OUTPUT

A Boolean value that controls whether verbose output is provided while page objects are loading for the first time after an Internet Information Service (IIS) reset. A value of True provides verbose output, and a value of False suppresses verbose output.

By default, both possible settings of the variable MSCSEnv in the Global.asa file, PRODUCTION and DEVELOPMENT, result in VERBOSE_OUTPUT being set to False. Modify the Global.asa file as necessary to set this variable to True.

There is also an Application object variable with the same name as this global variable.


All rights reserved.