web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Is Full compile needed for single line code change in a custom Class or a Table?

(0) ShareShare
ReportReport
Posted on by 3,175

I have always got different answers on this, so asking this on the forum...

we are on AX 2012 R3 CU11.

Lets say I have 3 custom objects: ClassA, ClassB and MenuItemC. None of these are dependent on any out of box objects.

  1. ClassA is called from ClassB
  2. MenuItemC calls ClassB

Now this is all working in Production env.

As part of a new requirement I have to change one line of code in ClassA on my Dev/Test env.  Compiled all the 3 custom objects, Forward compiled on classes, Incremental CIL and then verified that is functional as per the new requirement.

Now to push this small change to Production env which option can I use :

  • Option1: can I do an XPO import of ClassA into Prod env and Compile all the 3 custom objects, Forward compile on classes, Incremental CIL ?
  • Option2: can I push the ModelStore from Dev/Test to Prod env ?

For big changes yes we do full compile, full CIL in Dev/Test env and push the ModelStore to Prod env.

Thank you

Santosh

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Importing an xpo is an equivalent of writing code by hand; it's not a deployment technique and shouldn't be used to promote code to production. It creates a new, untested version of the application, there is a risk of omitting objects, import failures, causing problems with IDs, .xpo files can't deliver information about object deletions, it requires compilation in production (= long downtime) and so on...

    You should use automated builds to create a model, test this model and when it's tested successfully, you can promote it to production. Putting random pieces of code to production is anarchy and will harm you and your client sooner or later. Too often I see implementation where people have no idea what code they have in production, their testing is inconclusive because the Test environment doesn't match the Production one, they waste time fixing ID conflicts and so on...

  • San Artham Profile Picture
    3,175 on at

    Thank you Martin for the reply.  I agree with you and this is what I try to follow.

    my current AX implementation is a fast paced environment, it is common to find a requirement gap after a customization is deployed to Production env.  In short to support these scenarios our Partner firm is following this procedure:

    1. Export the selective XPO from the Build env (Build env is automated for nightly TFS sync and compile)

    2. Import it into QA env, Just compile the XPO and Incremental CIL in QA

    3. once it passes the Smoke Test cases in QA:

        a) restore the QA's ModelStore DB into Prod env  (during downtime and Prod AOS is stopped during this time)

        b) DataDictionary Sync in Prod env

    I have been pushing for Full Compile and Full CIL in QA even for a small change too.

    To avoid ID conflicts we are restoring Prod/QA ModelStore DB into all the non-Prod envs.

    Are we missing anything here ?

  • San Artham Profile Picture
    3,175 on at

    thank you Sukrut for the reply.

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    I think I've already enumerated quite a few things you're missing. Another one I see in your current process is that if anybody introduce any problem in QA (e.g. unintentionally deleted object), you'll blindly put it into straight to production. If you used a modelstore import, it would at least stop you from importing ID conflicts leading to data loss.

    If somebody believe that saving thirty minutes needed to full compile + full CIL is worth introducing all the risks, all right, it's their responsibility...

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans