Tuesday, September 26, 2017

Short book review: Implementing Microsoft Dynamics 365 for Finance and Operations, Enterprise Edition

Authors: Rahul Mohta (@RahulMohta8), Yogesh Kasat (@yogeshkasat) and JJ Yadav (@JJYadav)

Link to purchase:

This book covers the implementation process for a D365FOE project from A-Z. It combines theory with real life experience and it collects information you would have to look up multiple different places otherwise.

The book is very much up to date, also with information about the July 2017 release. It’s an impressive achievement to make the book so much up to date, taking into account the pace of changes from Microsoft. One thing that is not up to date though is the description of the database log implementation which has changed in the July 2017 update.

I currently work with ISV product development, not doing project implementations currently and I can say that I have learned a lot from this book. I could definitely see myself use this book as reference for future work.

A digital copy of the book was provided at no cost for me, by the authors, for the purpose of this short review.

Friday, September 22, 2017

The role of XLIFF files in the LCS Translation service

In the July 2017 release for LCS, support for XLIFF Translation Memory (TM) files was added. XLIFF (XML Localisation Interchange File Format) is an XML format used to standardize how translations are passed between different tools (Wikipedia).

Such a file holds a lot of information, like tags for source- and target languages, source- and target texts, indication whether the target text is the result of a machine translation, indication about if you actually want a translation of a given text (using {locked} in the comment of a label sets this flag to No), workflow status in relation to review of a translation and much more.

If you have existing translations and you need to add new translations to a project, you would want to tell the translation service about your existing translations to avoid getting them overwritten. You do that by requesting an XLIFF file as the first thing you do:

And here you upload a source and target label file:

In relation the tips 1,2 and 3, it seems like the label files are structured well enough for the tool not care about it. I have uploaded files with different number of labels, because new labels only have been added to source label file and I have used files where a few labels was not in the exactly same order. If it doesn't work out, you must prep the target file first.

As a result the browser returns the XLIFF file almost immediately.  Make sure your browser doesn't block downloads, otherwise nothing happens.

This is a small sample from a file:

You can also open it it Excel:

At this point you can actually start working with the translation. For example by inserting manual translations that you want included.

You can also use the "Multilingual app toolkit" from Microsoft to work with the file. The program is a bit outdated, latest supported Windows version is Windows 8.1 and the integration to Microsoft Translation services is broken. But as an editor the program works fine, and it has a fine UI for all the important tags of the XML file. 

It looks like this:

Now that you have the base for the translation, you can start the actual translation.

This takes you to the file upload dialog, where you upload zip files with your labels and with your XLIFF file:

When you click submit, the the job enters status processing.

There are some manual steps involved in the processing and you'll get an e-mail from the LCS team stating that this could take up to 5 business days. This manual involvement is related to the Microsoft Translator Hub being fed with your XLIFF files in order to train it using your existing translations. This should mean that it is able to pick up on how you have translated existing terms and reuse that way of translating for similar terms. For example (an example from AX 2012 that didn't go well there) the word "Visa" can be translated into two different words in Danish. Either as a required travel document (da: visum) or the credit card (da: Visa). When the translator hub knows what you have translated "Visa" into in other places in your label file, it has a better chance of determining what kind of visa you refer to.

In order to not start manual work just for the sake of this blog post, here is the result from another translation task.

The second file is a new label file which you can check into VSTS. You can do that directly or use this process if you might have other changes to the label file: Merge externally modified label files

The first file is a new XLIFF file including all the new translations. You can send this file out for manual review and the receivers can open it essential using a tool of their choice. Excel or the Multilingual App Toolkit would be good choices. You can actually also find a couple of online tools where you upload the file, edit the translations and download an updated file.

If the review causes changes to the XLIFF file, you can click the Regenerate button, upload the modified XLIFF file and almost immediately get a new label file based on that.

If you are 100% sure that only your source label file gets changes during development, you can keep this new XLIFF file and recycle it for your next translation. If both source and target could be changed, you should build a new XLIFF file.

Thursday, September 14, 2017

Sample loop through metadata of model

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using Microsoft.Dynamics.AX.Metadata.Management;
using Microsoft.Dynamics.AX.Metadata.Modeling;
using Microsoft.Dynamics.AX.Metadata.Storage;
using Microsoft.Dynamics.AX.Metadata.Providers;
using Microsoft.Dynamics.AX.Metadata.MetaModel;

namespace MetaDataExample
    class Program
        static void Main(string[] args)
            string packagesLocalDirectory = @"J:\AosService\PackagesLocalDirectory";
            IMetadataProvider diskMetadataProvider = new MetadataProviderFactory().CreateDiskProvider(packagesLocalDirectory);

            var l = diskMetadataProvider.Tables.ListObjects("MyModelName");
            var le = l.GetEnumerator();

            while (le.MoveNext())
                AxTable t = diskMetadataProvider.Tables.Read(le.Current);



Wednesday, September 6, 2017

Important caveat with the "Chain of command" (CoC) feature

If you use CoC with the July 2017 application release, you need to compile and deploy the standard models you eventually use CoC with. The reason being that the standard models are compiled with Update 8 which didn't have CoC.

This is a temporary inconvenience, and will not be necessary after the "Autum" release.

So, if you write ISV/VAR solutions, you might want to postpone usage of CoC for anything you release before the "Autum" release.

Thursday, August 17, 2017

Package problem with LCS Code Upgrade to July 2017 release

If you get an error like "There is a problem with package 'ContactPerson'. Either the source version being upgraded from is incorrectly identified, or the target version has a package with the same name as a custom package." and you don't have a custom package of the same name, the solution could be the following.

In your existing source (Main branch) you should remove dependencies to the failing models from you model definitions. Check in the change and start the upgrade tool again.

When the upgrade tool is finished you should roll back your change in Main, to keep that branch working.

Wednesday, August 9, 2017

Database log changes in Update 8

Update 8 changes how the database log is logging changes to data. Before Update 8 this was handled through triggers in the kernel and then some application code.

In Update 8 this now happens on triggers created on the SQL Database for each table you enable logging on.

You can still find the old application code in Update 8, but it is not triggered anymore.

There is a bit more information on this community thread:

Friday, July 14, 2017

Clear the AOD cache, including the SysExtension cache, from the UI

There is really no place in the UI of "Microsoft Dynamics 365 for Finance and Operations, Enterprise Edition" where you can find a button to clear the AOD cache.

If you for example introduce a new class to an extension based on SysExtension this is a problem, because it wont be picked up until the cache has been cleared.

The earlier workaround doesn't seem to work in the "July 2017" update.

But the class to clear the cache is runable, so you can build a URL to call it:

https://[your AOS]

Or just make the URL for the menu item:
https://[your AOS]

Big thank you to Volker Deuss for giving me this idea.