Cfg_InstInitialize Event
This event is called once for each session after the customizable product is instantiated and before any user requests are accepted. The customizable product selection pages do not display until all scripts associated with this event have finished.
Syntax
Cfg_InstInitialize (RootProduct as String)
The following table explains the argument in this syntax.
Argument | Description |
---|---|
RootProduct |
String. The name of the customizable product. |
Returns
None.
Usage
Use this event to store global variables that will be reused, such as BusObjects and BusComps. This event is also useful for reading information from external sources such as forms or SmartScript.
The Cfg_InstInitialize event is always triggered for Root Customizable Products. However, it can also be triggered for child customizable products under the scenarios described here.
For example, you have the following product structure.
Root Customizable Product
|_Relationship
|_Child Customizable Product
When the default cardinality on the relationship is greater than 0 (that is, a child customizable product is initialized as part of the root customizable product) and the user customizes the root customizable product, the following events are triggered:
For the root customizable product: Cfg_InstInitialize - Root CP
For the child customizable product: Cfg_InstInitialize - Root CP
When the default cardinality on the Relationship is set to 0 (that is, a child customizable product is not initialized as part of the root customizable product) and the user customizes the root customizable product, the following event is triggered:
For the root customizable product: Cfg_InstInitialize - Root CP
If you try to add the child customizable product manually after the configuration session is loaded then Cfg_InstInitialize - Root CP is not triggered for the child customizable product.