KVSKBASetupAndDemoDataPackage#
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):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASetupAndDemoDataPackage", 'OnBeforeDemoDataImportOnAutomatedImport', '', false, false)]
local procedure DoSomethingOnBeforeDemoDataImportOnAutomatedImport(var Result: Boolean; var IsHandled: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASetupAndDemoDataPackage", 'OnBeforeSetupDataImportOnAutomatedImport', '', false, false)]
local procedure DoSomethingOnBeforeSetupDataImportOnAutomatedImport(var Result: Boolean; var IsHandled: Boolean)
begin
end;
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.