new CopyModuleUtils()
Class containing utility functions for copying modules
- Source:
Methods
copyModule(pInputMapping)
Creates a copy of a specified module together with specified subordinated modules.
The structure of the input mapping object is the following:
pInputMapping { (only one rootModule allowed) $rootModule$: { condition: "sqlWhereCondition" , ValueMapping: {$colName$: "value"} , destinationModuleName: "destinationModuleName" , DestinationColumnMapping: { $sourceColName$ : "destinationColName" } , SubModules: { $Module$:{ condition: "sqlWhereCondition" , ValueMapping: {$colName$: "value"} , destinationModuleName: "destinationModuleName" , DestinationColumnMapping: { $sourceColName$ : "destinationColName" } , SubModules: {...} } } } }
The structure of the input mapping object is the following:
pInputMapping { (only one rootModule allowed) $rootModule$: { condition: "sqlWhereCondition" , ValueMapping: {$colName$: "value"} , destinationModuleName: "destinationModuleName" , DestinationColumnMapping: { $sourceColName$ : "destinationColName" } , SubModules: { $Module$:{ condition: "sqlWhereCondition" , ValueMapping: {$colName$: "value"} , destinationModuleName: "destinationModuleName" , DestinationColumnMapping: { $sourceColName$ : "destinationColName" } , SubModules: {...} } } } }
Parameters:
Name | Type | Description |
---|---|---|
pInputMapping |
Object |
- Source:
Example
var CMUtils = new CopyModuleUtils();
var InputMapping = {
"OFFER": {
condition: "OFFERID = '" + vars.get("$field.OFFERID") + "'"
,SubModules:{
"OFFERITEM": {
condition: "OFFER_ID = '" + vars.get("$field.OFFERID") + "' order by ITEMSORT"
}
}
}
}
CMUtils.copyModule(InputMapping);
openNewModules(pNeonContext, pModulesMapping)
opens the new created modules in neonClient
Parameters:
Name | Type | Description |
---|---|---|
pNeonContext |
String | req Name of the neon context that should be opened |
pModulesMapping |
Object | req ModulesMapping object created by method copyModule |
- Source:
Example
var ModulesMapping = CMUtils.copyModule(InputMapping);
CMUtils.openNewModules("Offer_context", ModulesMapping);