KVSKBASetupAndDemoDataPackage
Implements [#437dbf0e84ff417a965ded2bb9650972#Shipment Method ](https://github.com/search?q=Table+%5b%23437dbf0e84ff417a965ded2bb9650972%23Shipment+Method+%3aocticons-mark-github-16%3a%5d(https%3a%2f%2fgithub.com%2fsearch%3fq%3dTable%2b%2523437dbf0e84ff417a965ded2bb9650972%2523Shipment%2bMethod%2brepo%253AStefanMaron%252FMSDyn365BC.Code.History%26type%3dCode)+repo%3AStefanMaron%2FMSDyn365BC.Code.History&type=Code).
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.