Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Developing for different versions of Sandbox and Production environments

Posted on by 10

We are developing extensions using AL and managing source control using git. We have development and master branches in our git repo. We only deploy the development branch to the sandbox environment and, likewise, only deploy the master branch to the production environment.

The problem we are running into is the sandbox environment on version 18 and a production environment on version 17. This poses a problem with the "application" and "platform" version information in the app.json file when merging changes from the development branch to the master branch. We are having to make an additional commit to the master branch to update this version information to the appropriate target version.

I am curious how others are managing that situation.

Would it be appropriate to simply specify the minimum version to be the lowest common denominator between the two environments? In our case, we would target version 17.0.0.0 for both the "application" and "platform" versions. 

  • srine69 Profile Picture
    srine69 10 on at
    RE: Developing for different versions of Sandbox and Production environments

    Lorne, thanks for the suggestion. The problem is not with the build. It is with the lifecycle of the code. Changes made in the development branch are deployed to the sandbox environment for testing. When approved by the customer, the development branch is merged to the master branch. In the development branch / test environment we are targeting version 18. In the master branch / production environment we are targeting version 17.

    I suppose we "could" modify the platform and application settings in the app.json file during the DevOps build based on the branch being built. Is that what you are suggesting?

    The unfortunate side of that is the build pipeline will have to be updated when the environment versions change, but that should be far less often than the merges from development to master.

  • Suggested answer
    MahGah Profile Picture
    MahGah 15,428 on at
    RE: Developing for different versions of Sandbox and Production environments


    Hi Lorne 

    Thank you for point out ADO. My question is sometimes some codeing difference between version of BC (Microsoft sent email and says these are error to fix). Now if our partner uses ADO and fix those codes than they will have 2 versions. Then if they add new code to newer version do they need to go and add the same code to other version?

    Thanks

  • AriaConsulting Profile Picture
    AriaConsulting 2,655 on at
    RE: Developing for different versions of Sandbox and Production environments

    Have either of you (or the partner in MahGah's case) investigated ADO (Azure DevOps)?  In ADO you can have multiple builds in one pipeline if configured correctly, or you can have 2 pipelines and merge them when appropriate.  Perhaps worth looking into.

  • Suggested answer
    MahGah Profile Picture
    MahGah 15,428 on at
    RE: Developing for different versions of Sandbox and Production environments

    Hi

    Recently we ran to the same issue and our partner gave us to options:

    1) have 2 versions of app. One is for 17 and another for 18. Which means any development needed to happen twice. Then when we upgraded our production to 18 we could retire the 17 app.

    2) Finish development in 18 (maintain one version) then when we are ready to upgrade to 18 upload the app and use Next Major Version. 

    But it could be other ways that I am not aware of it. 

    Thanks

    pastedimage1628101052569v1.png

  • Suggested answer
    Andy Sather Profile Picture
    Andy Sather on at
    RE: Developing for different versions of Sandbox and Production environments

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans