KVSKBASetupAndDemoDataPackage
Implements #2b6ee9f5d5ac4624beeed0c03606b396#KVSCOREiDataPackage . Summary: Implements the KVSCOR Ei Data Package contract for Setup And Demo Data Package.
Procedures
GetDescription() : Text
Summary: Returns the description of this data package.
procedure GetDescription(): Text
Returns: Description text for the setup and demo data package.
Remarks: This procedure implements the KVSCOREiDataPackage interface and provides a human-readable description of what this data package does. The description indicates that the package creates setup data including number series and other configuration data.
This description is typically displayed to users in setup wizards or data import dialogs
to help them understand what will be created when they apply this package.
SetupDataAvailable() : Boolean
Summary: Indicates whether setup data is available in this package.
procedure SetupDataAvailable(): Boolean
Returns: TRUE if setup data is available, FALSE otherwise.
Remarks: This procedure implements the KVSCOREiDataPackage interface and indicates that this package includes setup data. The return value of TRUE means that the CreateSetupData procedure can be called to create the setup data.
Setup data typically includes:
- Number series configuration
- Default setup values for KUMAVISION tables
- Other foundational configuration data required for the application to function
This is used by the KVCORE data package framework to determine which packages offer setup data
during installation or configuration wizards.
DemoDataAvailable() : Boolean
Summary: Indicates whether demo data is available in this package.
procedure DemoDataAvailable(): Boolean
Returns: TRUE if demo data is available, FALSE otherwise.
Remarks: This procedure implements the KVSCOREiDataPackage interface and currently indicates that no demo data is available in this package. The return value of FALSE means that the CreateDemoData procedure will not create any demo data when called.
The TODO comment indicates this may change in the future:
"Change to true when demo data may be available in the future"
Demo data typically includes:
- Sample customers, vendors, and items
- Example transactions and documents
- Test data for training or evaluation purposes
This is used by the KVCORE data package framework to determine which packages offer demo data
during installation, allowing users to quickly populate the system with sample data for
training or evaluation scenarios.
DemoDataImportOnAutomatedImport() : Boolean
Summary: Determines whether demo data should be imported during automated import processes.
procedure DemoDataImportOnAutomatedImport(): Boolean
Returns: TRUE if demo data should be imported automatically, FALSE otherwise.
Remarks: This procedure implements the KVSCOREiDataPackage interface and controls whether demo data from this package should be automatically imported during automated setup processes.
Default behavior:
- Returns TRUE by default, indicating demo data would be imported if available
Customization:
- Integration event OnBeforeDemoDataImportOnAutomatedImport allows subscribers to override
the default behavior by setting the result parameter and IsHandled flag
- Subscribers can prevent automated demo data import for specific scenarios or configurations
Use cases:
- During initial company setup to automatically populate with demo data
- In sandbox environments for testing purposes
- For training databases that need sample data
Note: Since DemoDataAvailable currently returns FALSE, this setting has no practical effect
until demo data is actually implemented in this package.
SetupDataImportOnAutomatedImport() : Boolean
Summary: Determines whether setup data should be imported during automated import processes.
procedure SetupDataImportOnAutomatedImport(): Boolean
Returns: TRUE if setup data should be imported automatically, FALSE otherwise.
Remarks: This procedure implements the KVSCOREiDataPackage interface and controls whether setup data from this package should be automatically imported during automated setup processes.
Default behavior:
- Returns TRUE by default, indicating setup data should be imported automatically
- This ensures essential configuration data is created during initial company setup
Customization:
- Integration event OnBeforeSetupDataImportOnAutomatedImport allows subscribers to override
the default behavior by setting the result parameter and IsHandled flag
- Subscribers can prevent or conditionally allow automated setup data import based on:
* Company type or configuration
* User permissions or roles
* Existing data in the system
* Deployment scenarios (production vs. test)
Use cases:
- Automatic setup during new company creation
- Ensuring number series and essential configuration exists
- Deployment automation in multi-tenant environments
The setup data created includes number series and other foundational configuration required
for KUMAVISION functionality.
CreateSetupData() :
Summary: Creates the setup data for KUMAVISION Base functionality.
procedure CreateSetupData():
Remarks: This procedure implements the KVSCOREiDataPackage interface and creates essential setup data required for KUMAVISION Base functionality. The actual data creation is delegated to the KVSKBACreateSetupData codeunit.
Setup data created includes:
- Number series for KUMAVISION documents and entities
- Default configuration values in setup tables
- Other foundational data required for the application
This is typically called:
- During initial company setup
- When installing or upgrading KUMAVISION extensions
- From setup wizards or configuration pages
- As part of automated deployment processes
Preconditions:
- Should only be called when SetupDataAvailable returns TRUE
- Typically called once per company during initial setup
The procedure ensures that all necessary configuration is in place before users can start
working with KUMAVISION functionality.
CreateDemoData() :
Summary: Creates demo data for KUMAVISION Base functionality.
procedure CreateDemoData():
Remarks: This procedure implements the KVSCOREiDataPackage interface but currently does not create any demo data. The procedure body is empty, which corresponds to the DemoDataAvailable procedure returning FALSE.
When demo data functionality is implemented in the future, this procedure would create:
- Sample customers, vendors, and items
- Example sales and purchase documents
- Test transactions for training purposes
- Other demonstration data to showcase KUMAVISION features
Typical usage (when implemented):
- During sandbox environment setup
- For training databases
- In evaluation or demo systems
- To help users understand system capabilities
Preconditions:
- Should only be called when DemoDataAvailable returns TRUE
- Setup data should be created first (via CreateSetupData)
Note: This is a placeholder for future implementation as indicated by the TODO comment
in the DemoDataAvailable procedure.
RunSetup() :
Summary: Runs the setup process for KUMAVISION Base functionality.
procedure RunSetup():
Remarks: This procedure implements the KVSCOREiDataPackage interface and executes the setup process by calling the KVCORE framework's DataDefaults.RunSetup procedure.
The setup process typically:
- Validates that required setup data exists
- Initializes default values in configuration tables
- Performs any necessary post-installation configuration
- May trigger additional setup steps specific to KUMAVISION modules
This is called:
- After setup data has been created (via CreateSetupData)
- As part of the overall installation or upgrade process
- From setup wizards or guided setup pages
- During automated deployment sequences
The delegation to KVSCOREDataDefaults.RunSetup ensures that the setup follows the standard
KVCORE framework patterns and integrates properly with the overall setup infrastructure.
This procedure should be called after CreateSetupData to finalize the configuration.
ProvidingApp() : ModuleInfo
Summary: Returns information about the app providing this data package.
procedure ProvidingApp(): ModuleInfo
Returns: ModuleInfo record containing app information.
Remarks: This procedure implements the KVSCOREiDataPackage interface and returns metadata about the extension/app that provides this data package. The information is retrieved from the KVCORE framework's DataDefaults codeunit.
The returned ModuleInfo typically includes:
- App ID (unique identifier)
- App name and publisher
- App version number
- Other metadata about the extension
This information is used by:
- The data package framework to track which apps provide which packages
- Setup wizards to display app information to users
- Logging and diagnostics to identify data package sources
- Dependency management to ensure correct package loading order
The delegation to KVSCOREDataDefaults.ProvidingApp ensures consistent app information
retrieval across all KUMAVISION data packages.
Events
OnBeforeDemoDataImportOnAutomatedImport(Boolean, Boolean) :
Summary: Integration event that allows customization of whether demo data should be imported automatically.
[IntegrationEvent(false, false)]
local procedure OnBeforeDemoDataImportOnAutomatedImport(var Result: Boolean; var IsHandled: Boolean):
Parameters:
Result: The decision whether to import demo data; subscribers can modify this value.IsHandled: Set to TRUE to indicate the decision has been handled by a subscriber.
Remarks: This event fires in DemoDataImportOnAutomatedImport before returning the default result, allowing subscribers to override whether demo data should be automatically imported.
Default behavior (before event):
- Result is set to TRUE (demo data would be imported if available)
Subscribers can:
- Set Result to FALSE to prevent automated demo data import
- Set Result to TRUE to ensure demo data is imported
- Set IsHandled to TRUE to indicate they have made the decision
- Implement conditional logic based on:
* Company type or configuration
* User roles or permissions
* Environment type (production vs. sandbox)
* Existing data in the system
* Custom setup preferences
Use cases:
- Preventing demo data import in production environments
- Allowing demo data only for specific companies or users
- Implementing custom rules for when demo data should be created
- Logging or auditing automated import decisions
Note: This event only affects the decision; the actual demo data creation is controlled by
DemoDataAvailable and CreateDemoData procedures.
OnBeforeSetupDataImportOnAutomatedImport(Boolean, Boolean) :
Summary: Integration event that allows customization of whether setup data should be imported automatically.
[IntegrationEvent(false, false)]
local procedure OnBeforeSetupDataImportOnAutomatedImport(var Result: Boolean; var IsHandled: Boolean):
Parameters:
Result: The decision whether to import setup data; subscribers can modify this value.IsHandled: Set to TRUE to indicate the decision has been handled by a subscriber.
Remarks: This event fires in SetupDataImportOnAutomatedImport before returning the default result, allowing subscribers to override whether setup data should be automatically imported.
Default behavior (before event):
- Result is set to TRUE (setup data will be imported automatically)
- This ensures essential configuration is created during automated setup
Subscribers can:
- Set Result to FALSE to prevent automated setup data import
- Set Result to TRUE to ensure setup data is imported (already default)
- Set IsHandled to TRUE to indicate they have made the decision
- Implement conditional logic based on:
* Company configuration or type
* Deployment environment (production, test, development)
* Existing setup data (to avoid duplicates or conflicts)
* User permissions or roles
* Custom installation requirements
Use cases:
- Preventing duplicate setup data creation in existing companies
- Conditional setup based on license or module activation
- Custom setup sequences in multi-company environments
- Allowing manual setup only in specific scenarios
- Implementing approval workflows for automated setup
Important: Preventing automated setup data import may require manual configuration to ensure
the system has the necessary number series and setup records to function properly.