When moving data from a sandbox environment to your dev-box you need sqlpackage to unpack the bacpac file to a database. This could give you an error message stating that the file contains corrupted data:
To get yourself passed this you can download the .net core edition of the SQLPackage from here:
This is something that I forget 2 seconds after I’ve used it so now I’ll put it here as a note to self.
I have a series of TSQL scripts that I use once in different circumstances and often it’s a while between each go. In some of the I need to add some environment specific information and instead of having to scroll down through the text the query editor offers a way of prompting for parameters through a tagging of text like this:
select <Parameter name, Data type, Default value>
Before executing the script you press CTRL+SHIFT+M (this is the part I usually forget) and that makes the editor prompt you like this:
Replace the Default value with the appropriate text and click OK. This will update your SQL script to this:
Not the most mind-blowing thing in the world, but a great help.
In Dynamics 365 the offline story on the MPOS has been significantly improved since AX 2012. Now it’s more or less a click on the register in Dyn365, install the POS and distribute data. A bit simplified approach to life but anyways.
Here’s something I’ve seen a couple of times now. There’s just no jobs and nothing to process …
The event log gives it away a bit:
Failed to get offline sync data in offline database due to Exception. Error Details: Data Source=localhost\SQLEXPRESS;Initial Catalog=RetailOfflineDatabase;Integrated Security=True;Persist Security Info=False;Pooling=True;Encrypt=True;TrustServerCertificate=True
And in the details it’s clear that we’re facing a rights issue here. But in SQL Express with no management tools on the POS machine we don’t have many configuration options and even less when we’re in a setup with a large number of registers.
All you need to do is add the user logged in to Windows to these two groups on the local machine:
Log off and on again to activate the changes. Start your POS and check the database connection status. Hopefully, you should see a lot of jobs now:
Moving data between different instances of Dynamics 365 should be relatively easy with the Data Management framework. Microsoft offers a long list of entities and default templates nicely grouped into relevant packages.
In 7.2 we did experience some issues with loading the default templates, but that seemed fixed in 7.3.2. The real problems showed up when trying to import the packages in projects created based on the export file.
It seemed like after importing file number one or two the Data Management forms got corrupted with an error stating: “Method not found: ‘Dynamics.AX.Application.FormBuildControl Dynamics.AX.Application.FormBuildControl.parentControl()’.”
All other forms checked worked. After a full compile we were back on track, but that really wasn’t a working solution with multiple packages to import.
Debugging the forms didn’t add anything valuable to the troubleshooting. Going back to start and breaking it up into smaller chunks it appeared too random to be data driven as first suspected.
The solution – don’t ask how I ended there – is like this:
After each package I cleared the browser cache and refreshed the tab running my Dynamics 365….
And here a little pitch of Google Chrome that allows you to only clear the most recent part of the data:
It adds a bit of overhead to the data import having to do this step between each package; but nothing compared to the alternatives.