Simple Object Designer
Empowering you to customize Microsoft Dynamics 365 Business Central without writing a single line of code
Dual-App Mode
The Dual App Mode is a new feature in the latest version of the Simple Object Designer for Business Central. It allows developers to create two separate apps during development, making co-development easier, especially when collaborating with partners. This setup helps avoid circular dependencies that can occur when two apps depend on each other.
Why Use Dual-App Mode?
Dual App Mode addresses the issue of cyclic references that arise when two apps have mutual dependencies. In a traditional single-app setup, this can create a “Catch-22” where neither app can be installed first, causing a dependency loop.
With Dual App Mode:
- The first app contains all the objects you produce (tables, fields, etc.).
- The second app manages all dependencies, including those created in the first app or imported from partner apps.
This separation ensures that circular dependencies are avoided, streamlining deployment and collaboration.
How to Enable Dual App Mode
- Open Simple Object Designer and navigate to the Setup function.
- Locate the App Generation Mode field, which defaults to “Single”.
- Change the mode to Dual.
- You will now see two app names:
- My Customization
- My Customization 2
The first app handles fields, tables, and other direct modifications. The second app manages consumption, such as field placements, reports, and API exposures.
Key Requirements for Dual App Mode
- Use the Microsoft AL Compiler:
- Dual App Mode requires the Microsoft AL Compiler, which is integrated into the Simple Object Designer.
- To enable it, select the Microsoft Compiler option within the setup.
Deployment Process
Once Dual App Mode is enabled:
- Publish the apps as usual.
- Simple Object Designer will generate two separate apps.
- A zip file containing both apps will be available for download.
- Extract the zip file and install the apps sequentially:
- Install App 1 first, followed by App 2.
Ensure that the deployment screen remains open until both apps are fully deployed. Closing the screen prematurely may interrupt the installation process.
Collaborating with Partners
When working with partners, inform them to:
- Reference App 1 for fields that need to be included in their reports.
- Avoid referencing App 2, as it handles your app’s dependencies.
This approach prevents circular dependencies and maintains a clean dependency chain.
Switching Back to Single App Mode
If you wish to revert to single app mode:
- Uninstall App 2 and delete its extension data.
- Change the App Generation Mode back to Single in the setup.
- Publish again to create a single app file.
Note: Deleting extension data for App 2 is crucial before switching to Single App Mode, as it prevents conflicts during deployment.
Best Practices
- Test in a Sandbox: Dual App Mode can be tested in a sandbox environment. This is highly recommended before deploying in a production environment.
- Communicate with Partners: Clearly define which app your partners should reference to avoid confusion.
- Maintain Consistent Versioning: Ensure both apps have matching version numbers to simplify maintenance and updates.
