Sie sind auf Seite 1von 6

9/22/2017 Resolving X++ and metadata conflicts when merging code – Learning Dynamics 365 for Operations / X++

Learning Dynamics 365 for Operations / X++


A DBA becomes an ERP system programmer. Learn the hard lessons with me.

Resolving X++ and metadata con icts


when merging code

In the near future, Microsoft will seal o customizations/overlayering in


Dynamics 365 for Operations. Once that happens, and VAR/ISVs catch up, you
won’t have the same problems with con icts while merging code from various
sources (including Microsoft’s own X++ hot xes). Until then, though… I found the
process of properly resolving con icts to be not completely intuitive, and ended up
doing unnecessary manual work and comparison for a while. Here’s how to do it
the right way (also the easier way), with a little-known secret or two to help.

You probably already know that after merging in new models, you need to go to
Dynamics 365 > Addins > Create project from con icts in Visual Studio to check for
con icts.

After doing so, you need to select which model to look for con icts in. Yes, you
need to do them one at a time. Yes, the dialog disappears after each check, making

https://brianjparker.tech.blog/2017/08/04/resolving-x-and-metadata-conflicts-when-merging-code/ 1/6
9/22/2017 Resolving X++ and metadata conflicts when merging code – Learning Dynamics 365 for Operations / X++

it a hassle to use if you are juggling models from a bunch of di erent ISVs.

To save time, be smart about which models you check. You only need to check
third party “customization” models, not “extension” models. (Comment if you
know of a way con icts can appear in extension models!) If you’re savvy, you
might be able to limit it further, if you know who is changing which objects. But
play it safe; you don’t want to miss any con icts!

Assuming you actually hit a con ict… it’s going to need to create a project. I like to
use a naming scheme like ModelNameCon icts_YYYYMMDD to make it easy to
clean up later.

The project will be created, and it will contain any and all objects that have
con icts. Here’s where it got confusing for me; intuitively, I thought I’d want to
right-click the object and choose “Compare and Merge Code” or something. Nope!
Start out by just opening the object.

https://brianjparker.tech.blog/2017/08/04/resolving-x-and-metadata-conflicts-when-merging-code/ 2/6
9/22/2017 Resolving X++ and metadata conflicts when merging code – Learning Dynamics 365 for Operations / X++

Once you open it, it won’t be obvious where the con icts are. They’re marked, but
if it’s a big complex object, it might be hard to nd them.

The secret?… put “cf:” in the search bar and hit enter.

The object will be ltered to show you the con icts. (See the little red double
arrows icon?)

What you do next depends on whether the con ict is in metadata or in code. It’s
not that di erent, though. One at a time, right click each object, and choose either
“Resolve property con icts” or “Resolve code con icts.”

https://brianjparker.tech.blog/2017/08/04/resolving-x-and-metadata-conflicts-when-merging-code/ 3/6
9/22/2017 Resolving X++ and metadata conflicts when merging code – Learning Dynamics 365 for Operations / X++

If it’s a property con ict:

If you are resolving a property con ict, you’ll get a GUI that you hopefully nd
intuitive.

If it’s a code con ict:

If you are resolving a code con ict, you’ll be given a DIFF tool to do the merge.
This post is not meant to fully explain code merges, but it might be intuitive for
you anyway, even if you aren’t already familiar with the concept.

https://brianjparker.tech.blog/2017/08/04/resolving-x-and-metadata-conflicts-when-merging-code/ 4/6
9/22/2017 Resolving X++ and metadata conflicts when merging code – Learning Dynamics 365 for Operations / X++

Whether you’ve done a property merge or a code merge, you’ll be able to mark the
con ict as resolved, so it won’t come up if you do another check for con icts.

However, re-merging models might cause the con ict to pop up again, if your
ISVs (or whomever you are merging from) do not integrate the merged changes.
So, be prepared to re-check in the future, and possibly correct the same con icts
repeatedly!

Advertisements

$33.60 $28 $25.20 $28

https://brianjparker.tech.blog/2017/08/04/resolving-x-and-metadata-conflicts-when-merging-code/ 5/6
9/22/2017 Resolving X++ and metadata conflicts when merging code – Learning Dynamics 365 for Operations / X++

Share this:

 Twitter  Facebook  Google

Like
Be the first to like this.

brian j. parker / August 4, 2017

Learning Dynamics 365 for Operations / X++ / Blog at WordPress.com.

https://brianjparker.tech.blog/2017/08/04/resolving-x-and-metadata-conflicts-when-merging-code/ 6/6

Das könnte Ihnen auch gefallen