About extending and replacing forms
Mongoose forms can form an inheritance hierarchy, with child forms extending parent forms in an arbitrary tree structure. This topic introduces a variation of the extension mechanism called “extend and replace.” When used, a form that “extends and replaces” a parent form is opened when a request to open the parent form is received, transparent to the user. This is similar to the extend and replace feature for IDOs.
Enable this extension mechanism by selecting the Load/Replace form with extended form check box in the User Preferences dialog box.
About the hierarchy of priorities in selecting extended forms
When the user selects this option and then requests a form, the IDO Runtime service uses this hierarchy of priorities to determine which form definition must be returned:
- Form Extensions form entry for
Form Name
If the Form Name value is the same as the Replaced By Form value, the extend and replace feature does not take place. The IDO Runtime service simply returns the requested form definition.
- Descendant forms in the extension hierarchy, with the Replace Base Form property set to
- The highest descendant level
- If there is no form found at this level, then the requested form definition is returned.
- If there is one form found at this level, then the requested form definition is replaced by that descendant form definition.
- If there are multiple forms found at this level, then you must use the Form Extensions form to determine which form definition must be returned.
- Form Extensions form entry:
- Language ID
- Scope Type
To identify which extended form is used to replace the requested form based on the hierarchical level, select
then click the icon.How the system resolves extended form conflicts
When the system has two (or more) extended forms at the same level in the hierarchy, and both extended forms have the "Replace Base Form" property set to
, this can result in a conflict when the form is called. In cases like this, the IDO Runtime service cannot determine which of the two forms to open. As a result, the IDO Runtime service looks for "hints" that might help to resolve the conflict.The WSFormExtensions table is used to maintain such conflict-resolution hints, as defined on the Form Extensions form. The IDO Runtime service uses the GetFormExtensionHintsSp stored procedure to query the WSFormExtensions table for applicable hints.
In some cases, you might want or need to override the default query used in the GetFormExtensionHintsSp stored procedure. In such cases, you have these options for overriding GetFormExtensionHintsSp:
- External Touch Point (EXTGEN_GetFormExtensionHintsSp)
- Override Stored Procedure (GetFormExtensionHintsOverrideSp)
The GetFormExtensionHintsSp stored procedure is designed to look for any such overrides. If one exists, GetFormExtensionHintsSp calls the override stored procedure instead of executing its own query logic.