Search This Blog
April 20, 2026
Intercompany Journal Import in D365FO [via customization]
June 07, 2024
[Solved] Dynamics 365FO DB restore error Line 1 The permission 'KILL DATABASE CONNECTION' is not supported in this version of SQL Server.
Error Details: The error message for BacPac DB restore is as follows:
Dynamics 365FO DB restore error Line 1 The permission ‘KILL DATABASE CONNECTION’ is not supported in this version of SQL Server. Alternatively, use the server level ‘ALTER ANY CONNECTION’ permission.
Step 1: Navigate to the folder where your BACPAC file is saved and change the file extension from .bacpac to .zip.
Step 2: Open the zip file and copy the model.xml file to a different location. Open the copied file in a text editor such as Notepad, VS Code, or Visual Studio. (Avoid editing the file directly in the zip folder or the original file).
Step 5: Change the file extension of the zip file back to .bacpac (reverse of Step 1).
Step 6: Go to the downloaded SQLPackage folder and execute the following command:
SqlPackage.exe /a:import /sf:J:\MSSQL_BACKUP\PreProdDB.bacpac /tsn:localhost /tdn:AxDB_PreProd2005 /p:CommandTimeout=1200 /TargetUser:"axdbadmin" /TargetPassword:"<DbPassword>" /TargetTrustServerCertificate:True /mfp:"ModelCopy.xmlDB import should be successful this time. April 12, 2024
QuickFix: "Value cannot be null. Parameter name: proxy" in DIXF
October 24, 2023
[Solved]Error while importing/Exporting opening balances DIXF (No active format for data entities has been set up)
November 11, 2022
Useful links for OData and Rest API integration
April 01, 2021
How to get meta data of an Data Entity MSDynD365
October 05, 2020
QuickFix -15:[Solved] Error The data value violates integrity constraints.
Getting below error while importing a file using the Data management framework.
Issue:
"The data value violates integrity constraints"
Possible solution:
Check two things primarily.
1. If any mandatory fields are blank in file
2. Set if a unique filed contain duplicate values in file.
-Harry Follow us on
Facebook to keep in rhythm with us. https:fb.com/theaxapta
July 02, 2020
[Solved] Issue with data entity EcoResReleasedProductCreationV2Entity - Error executing code. The field with Id '0' does not exist in table 'InventTableModule
Hi Folks,
There are two data available in system EcoResReleasedProductV2Entity and EcoResReleasedProductCreationV2Entity with a similar appearance. Let’s first understand the use of each, To create release products in the system user has to use EcoResReleasedProductCreationV2Entity while updating release products user have to use EcoResReleasedProductV2Entity.
Now let's discuss the error which I was facing while using EcoResReleasedProductCreationV2Entity data entity to create release product. Below is the error message.
"Result: Error executing code. The field with Id '0' does not exist in table 'InventTableModule'. "
Now to fix this issue you need to install one hotfix in your system which is suggested by Microsoft. Go to your LCS project and search for KB4559650,
now you have to install this KB on your machine. On successful deployment, you should be able to use this data entity to release product import.
Cheers!!!
-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta
September 02, 2019
Set up MT940 format for bank reconciliation #MSD365FO
In D365FO advance bank reconciliation is a feature to import bank statement file and automatically reconcile with related bank accounts. There are many formats which a bank commonly used i.e. ISO20022, MT940, BAI2.
In this post, we will see how to set up the MT940 format which is commonly used in most banks nowadays.
Let's get started.
Step 1: Get sample entity template and transformation files
To transform the source file into FnO format, you need few files and these are available under 'Resources' node of AOT. Files names are as below
Step 2: Create an import project
Under Data management workspace, create an import project with name MT940. Add a new file with below details
I. Entity Name: Bank statements
II. Upload file name: SampleBankCompositeEntity (which you got from Resource node)
Once file successfully uploaded, click on view map. On next screen select BankStatementDocumentEntity from the list and click on 'View Map' and go to 'Transformation' tab. Click new and click upload file, select different XLST file one by one, in the sequence shown in below image.
Step 3: Setup Bank statement format
Navigate to Cash and Bank management > Setup > Advance bank reconciliation setup > Bank statement format.
Here create a new record as below
Step 4: Configure the bank account to use Advance reconciliation option
Navigate to Cash and Bank management > Bank accounts. Select a Bank account to view details. Under Reconciliation tab,
I. Set the 'Advance bank reconciliation' option to 'yes'. This is a one-time setup, the system doesn't allow to undo/change once set to yes.
II. Set Statement format field to format which we have created in step 3 i.e. MT940
Step 5: Testing
Navigate to Cash and Bank management > Bank accounts. On Reconcile tab click on Bank statements.
On the next screen click on Import statement. A dialog will pop up. Fill/select details as below
I. Import statement for multiple bank account in all entities. : Set this as Yes if your file contains more than one bank accounts.
II. Bank Account: If the source file contains a single bank, select that bank here.
III. Statement Format: Select your statement format here it must be MT940.
IV: Bank statement file import: Select source file and click upload.
V: Click ok and it must import transaction in the current form.
Note: After every DB refresh you need to redo import project. DB will break the links and you need to remove the entity from your import project and add upload the transformation files accordingly.
-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta
PS: This post referred to MS documentation.
July 03, 2019
Working with Data entities in D365FO- Part II
Add new fields on DataEntities/Form from the user interface
Hi Folks,
In this post, I am going to share one new feature which comes with the latest update in #MSD365FO. Now you can add any custom field from the user interface, you don't need to add that in AOI, however, there are some limitation on this but having this option is good where user wants to add some fields on a form/entity which doesn't have any metadata dependency/Relation to other tables. Earlier this feature was limited to talent only now with recent version Microsoft bring this to Dynamics 365 FO as well.
For today’s post lets take an example customer group, You want to add a new field on customer group form. Let's call it ‘SPOC person’. Now to add a new field on a form, you need to personalize the form.
Open Customer group form, go Option menu, ‘select personalize this form’ option.
It will give you another pop-up window, select ‘Add Field’ and grid in the form where you want to add a new field(s).
on the next screen, click on ‘Create new field’
When you click on ‘Create new field’ a new form will open (kind of designer form). First, choose the table where you want to add this field. Select Customer Group here.
and fill other details as below, and hit the save button.
The system will ask for another confirmation
now, this field available to add on the form,
Once you insert this field, it will appear on the form,
Now go to System Administrator > setup > custom field. Select table from the dropdown list. In the entity tab, select data entity where you want to add this new field. The system will show all the entity where the CustGroup table used.
Now go to data management > Framework parameter > Entity Setting and refresh entity list.
Go to Customer groups entity and click on modify target mapping. Here generate the mapping. On successful completion, your custom field must available in mapping.

Here you go…. that all.
-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta
May 27, 2019
Working with Data entity in D365FO - Part I
-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta
December 21, 2018
How to set default fields to be available while using Excel add-ins
As we know D365FO comes with a powerful architecture for all integration using DIXF. Data entities are the only way (in most of the cases) to communicate with D365FO through an external system.
In today’s post, I’m going to share a quick tip on how to set default fields to be made available while using Excel add-ins for CRUD operation. Yes, now you can use excel add-ins to perform all CRUD operation on a user interface. Let's take the example of customer master.
Below screenshot shows how to access excel add-ins on customer master. Go to Customer master and on right-hand side upper corner, you may found Office icon. Click on it and select
It will show you all the data entities which are available in the system based on customer (CustTable) as the main data source. Select the first one,
and it will open an excel sheet with Dynamics Add-ins. You might need to sign in using a valid user which have access to D365Fo application. Excel must look like below with a Dynamics add-ins in left.
You can perform all CRUD operation here and hit publish button on the left down side to publish your changes to the server. That’s it.
Now coming to the title of this post, (it's not too late
Go to visual studio, open the data entity (in this case you need to create an extension of this entity). Go to field group > AutoReport. Here you must get all field which is showing on excel. You can do addition, delete, change the order of fields and that’s it. Once successful build changes will reflect when you use excel add-ins next time.
Cheers,
Harry
July 08, 2018
Import Data Packages through LCS
In my last post, we discussed how to create default data packages through the Asset library. LCS is really a good tool to manage your Dynamics project. Today we will discuss one more tool Configuration and Data manager.
Demo 1:
In the first demo, we will see how to import a single data package.
Step 1. Login in LCS. Select your project.
Step 2. Got to configuration and Data management tool. Below is the landing page
here 1. Menu tile, to perform operationsStep 3. Select a package from the grid ( section 2) and click on apply (section 1). The system will ask for destination environment,
2. Available list of data packages
3. Package details and version
4. List of entities in selected package (its blank here cause of my environment. )
Step 4: Once you select a destination environment, now you have to select the company (legal entity) where you want to import this data package.
Select the company and hit the Apply button.
Step 5: Now you go back to your environment and navigate to Data management workspace. You can see a new project created under Data management to import this data package. You can also track the job from the same screen.
Demo 2:
The above demo applicable for single data package import. You can also select multiple data packages and import them in both Concurrently and sequentially. Let's see how…
Step 1: Select multiple data projects (all package must belong logically same module/group)
Step 2: Click on Apply button and select the first option – ‘Apply concurrently’. On next screen give a tag name.
Step 3: Repeat step 3 to 5 from Demo 1.
If you select the other option ‘Apply sequentially’, the immediate next screen will ask for a sequence of data packages,
However, the system will give you default sequence based on name and entity contained. You can update the sequence of each package manually as well.
Once you set the sequence, rest steps are the same as the previous import.
I personally found this tool really helpful when a developer really need some test/setup data while development and they can not go back and forth to get dummy data. If the functional team have data in templates/Packages simple you can apply them to any dev/test box.
Try it and share your feedback.
Cheers
Harry…
June 30, 2018
How to create default Data packages Dynamics 365 FO
Now we all know how powerful and useful is LCS for Dynamics 365 projects. There are a lot of tools to manage your project efficiently and their powerful tool helps you to manage your project well. For any project Data management (import and export) is very essentials milestone for any environment and this can surely be a time consuming and lengthy if we are not using the right tools.
Well, LifeCycle service (LCS) provides a powerful tool to manage the data import and export for a project. Configuration and data manager tool (to import data package, will cover in next post) allows selecting multiple data packages and import in any environment for a project. In this article, I will show how to create default data package in LCS asset library. This tool will help you create the default template in a sequential manner.
(However, I planed a long back to write this article but….
Let's start…..
1. Login into https://lcs.dynamics.com/ using your organization credentials.
2. Select the project and go to Asset library > Process data Package; if you didn't see this tool icon on project landing page then try below
You can see we have only 2 files here.
3. Now to create default packages click on Import button and select a library from the list,
4. The above step will create a new record in process data package, it will create the data packages under ‘Data package’ tab in Asset library.
5. Once this process done you can go back to configuration and data manage toll you can see all the packages available here. You can download them, you can import them into any other environment. Also, you can download and fill out the data and upload them back on LCS to deploy these package on another environment.
Thanks all for the subjected topic, the below few details to explore further,
You can also update the Data packages (add new records, remove associate business process etc, ). To explore this go back to Asset library and click on your record and follow below steps.
In the next screen (Add data packages) you will see the list of all packages with sequencing number.
Also if you click on each package in above list in right window you will the details for the selected package.
Click on next> Next and complete this wizard. (for this post don’t select anything on 4th step ‘Associate business process to data package’)
Cheers
Harry
August 31, 2016
Recurring Data import/Export in AX7
Thanks to my friend Sharran sundar Balasubramaniam who helped me a lot on .net part.
September 15, 2015
DIXF error [AX2012 CU8]
Issue: While Open Processing Group (Data import export framework/Area page/Common/Processing Group), system throws below error message.
Could not load file or assembly 'Microsoft.Dynamics.AX.Framework.Tools.DMF.PreviewGrid, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Possible reason:
After a fresh installation of AX, we have DIXF as a module but we need to install additional component as well to use DIXF.
In this case we need to install DIXF client services from installation media.
Solution:
Install DIXF client services from AX setup and restart the AOS services.
Keep sharing your feedback as comment…..
Related post:
DIXF Error- Assembly containing type
-HarryFebruary 14, 2015
DIXF Error- Assembly containing type Microsoft.Dynamics.AX.Framework.Tools.DMF.ServiceProxy.DmfEntityProxy is not referenced.
May 22, 2013
How to Read/Write an Excel file through X++ code
How to write an Excel file through X++ code
In This Post you will found two code sample1.Write data in excel through X++ code.
2. Read from an Excel through X++ code
1.Write data in excel through X++ code.
static void thaAxapta_Write2Excel(Args _args)
{
InventTable inventTable;
SysExcelApplication application;
SysExcelWorkbooks workbooks;
SysExcelWorkbook workbook;
SysExcelWorksheets worksheets;
SysExcelWorksheet worksheet;
SysExcelCells cells;
SysExcelCell cell;
int row;
;
application = SysExcelApplication::construct();
workbooks = application.workbooks();
workbook = workbooks.add();
worksheets = workbook.worksheets();
worksheet = worksheets.itemFromNum(1);
cells = worksheet.cells();
cells.range('A:A').numberFormat('@');
cell = cells.item(1,1);
cell.value("Item");
cell = cells.item(1,2);
cell.value("Name");
row = 1;
while select inventTable
{
row++;
cell = cells.item(row, 1);
cell.value(inventTable.ItemId);
cell = cells.item(row, 2);
cell.value(inventTable.ItemName);
}
application.visible(true);
}
2. Read from an Excel through X++ code
static void theAxapta_ReadExcel(Args _args)
{
SysExcelApplication application;
SysExcelWorkbooks workbooks;
SysExcelWorkbook workbook;
SysExcelWorksheets worksheets;
SysExcelWorksheet worksheet;
SysExcelCells cells;
COMVariantType type;
int row;
ItemId itemid;
Name name;
FileName filename;
;
application = SysExcelApplication::construct();
workbooks = application.workbooks();
//specify the file path that you want to read
filename = "C:\\item.xls";
try
{
workbooks.open(filename);
}
catch (Exception::Error)
{
throw error("File cannot be opened.");
}
workbook = workbooks.item(1);
worksheets = workbook.worksheets();
worksheet = worksheets.itemFromNum(1);
cells = worksheet.cells();
do
{
row++;
itemId = cells.item(row, 1).value().bStr();
name = cells.item(row, 2).value().bStr();
info(strfmt('%1 - %2', itemId, name));
type = cells.item(row+1, 1).value().variantType();
}
while (type != COMVariantType::VT_EMPTY);
application.quit();
}
March 14, 2013
Exporting data to Excel from axapta x++
Exporting data to Excel from axapta x++
Hi All!
Sometimes we need to export data from Microsoft Dynamics AX to Excel using axapta x++ code and we don't know how to do this...
Exists some differents ways to do this, but I think the best way is using the SysExcel class of Dynamics AX and its related.
The only problem I found using this class... is that it can not be used in a batch process.
Sample code:
static void TheaxaptaCreateExcel(Args _args)
{
SysExcelApplication xlsApplication;
SysExcelWorkBooks xlsWorkBookCollection;
SysExcelWorkBook xlsWorkBook;
SysExcelWorkSheets xlsWorkSheetCollection;
SysExcelWorkSheet xlsWorkSheet;
SysExcelRange xlsRange;
CustTable custTable;
int row = 1;
str fileName;
;
//Filename
fileName = "C:\\Test.xlsx";
//Initialize Excel instance
xlsApplication = SysExcelApplication::construct();
//Open Excel document
//xlsApplication.visible(true);
//Create Excel WorkBook and WorkSheet
xlsWorkBookCollection = xlsApplication.workbooks();
xlsWorkBook = xlsWorkBookCollection.add();
xlsWorkSheetCollection = xlsWorkBook.worksheets();
xlsWorkSheet = xlsWorkSheetCollection.itemFromNum(1);
//Excel columns captions
xlsWorkSheet.cells().item(row,1).value("Account Num");
xlsWorkSheet.cells().item(row,2).value("Name");
row++;
//Fill Excel with CustTable AccountNum and Name fields (only 20 records)
while select custTable
{
if(row == 20)
break;
xlsWorkSheet.cells().item(row,1).value(custTable.AccountNum);
xlsWorkSheet.cells().item(row,2).value(custTable.Name);
row++;
}
//Check whether the document already exists
if(WinApi::fileExists(fileName))
WinApi::deleteFile(fileName);
//Save Excel document
xlsWorkbook.saveAs(fileName);
//Open Excel document
xlsApplication.visible(true);
//Close Excel
//xlsApplication.quit();
//xlsApplication.finalize();
}
-Harry










