Friday, April 13, 2012

How to resolve code conflicts



1.       Log into the layer you’re going to be resolving the conflicts for (cus)
2.       Open the upgrade layer conflict project (AxUpgradeLayerConflicts_cus)
3.       Select a class to resolve a conflict for (InvenCostItemDim)
4.       Right-click, Compare
5.       Optional – change the layers to compare – a SYP or GLP to the layer you’re in.
a.       I like to change select the SYP or GLP on top, because it will show up as red line, requiring my attention
b.      The cus layer will be blue, indicating the changes that we’ve made before (either via a hotfix application, customization or internal fix)
6.       Click Compare

7.       Select the first tree node with a red and blue square (it indicates a conflict)
8.       This means that the SYP layer from Microsoft has the _inventTrans.update without any parameters, and we have customized the method on the cus layer for some reason.
9.       The questions to ask are: what is the reason?
a.       Fix from MS that was earlier applied/made in CUS:
                                                               i.      if that is the only conflict in the method remove from CUS
                                                             ii.      if that is not the only conflict, then uplift the code to CUS, and remove your fix/hotfix
b.      Home-grown fix
                                                               i.      Same as above
c.       Customization
                                                               i.      Merge the fixes from MS into your customized method, leave your customizations intact
9.       Depending on the answers above, either skip the method or use arrows to move the code into the cus layer or remove the code.
9.       Proceed until you’ve resolved all the subnodes
Code upgrade process in dynamics ax 2009

9.       Close Compare window and save the object
9.       Mark the object as resolved

9.       Repeat until the day is over or you’re done with classes.
  .    When done, you can re-compare the classes. If there are no differences, it makes sense to delete the outward layer, e.g. cus.
.

No comments:

Post a Comment