• Skip to main content
  • Skip to primary sidebar
  • Home
  • About
  • Recommended Readings
    • 2022 Book Reading
    • 2023 Recommended Readings
    • Book Reading 2024
    • Book Reading 2025
  • Supply Chain Management Guide
  • PKM
  • Microsoft Excel
  • Microsoft Copilot in Office 365
  • Public Wiki Page

Ali Raza Zaidi

A practitioner’s musings on Dynamics 365 Finance and Operations

Dynamics Ax 7

Error importing database Could not load package from .bacpac. File contains corrupted data.

September 16, 2025 by alirazazaidi

So importing the latest backup on Dev machine, I found this error
It is very strange, because I installed from

And when I run the setup from this link Error appear.

Error importing database:Could not load package from ‘C:\temp-UATbackup.bacpac’.
File contains corrupted data.

Instead to download and install DacFramework.
Download and install latest .net version and extract it to your required folder

Download and Install SqlPackage – SQL Server | Microsoft Learn

From there, instead of using the Sqlpackage.exe under C:\Program Files (x86), please use the Sqlpackage.exe in C:\Temp\Sqlpackage-dotnetBoomb

Your import query will look like below

C:\Temp>SqlPackage.exe /a:import /sf:D:\Temp\UTup.bacpac /tsn:localhost /tdn:AxDB_fromProd1 /p:CommandTimeout=0

Custom lookup UIBuilder SSRS RDP Dynamics 365 for finance and operations

March 4, 2020 by alirazazaidi

Hi, Today I have simple code snippet to create a custom lookup in SSRS Reports in Dynamics 365 for finance and operations.

public class MyUIBuilder extends SrsReportDataContractUIBuilder
{

    private DialogField vendordf,dialogbranch;
    
    MyDC     contract;
    public void postBuild()
    {
        super();

        contract = this.dataContractObject();

        // binding dialogs with contract fields

        vendordf = this.bindInfo().getDialogField(this.dataContractObject(),
            methodStr(MyDC, parmHcmPerfPeriodId));
        dialogbranch = this.bindInfo().getDialogField(this.dataContractObject(),
            methodStr(MyDC, parmOMOperatingUnitNumber));

       dialogbranch.registerOverrideMethod(methodStr(FormStringControl,lookup),methodStr(BEHCMReviewUIBuilder,divisionCodeLookup),this);

  
        vendordf.registerOverrideMethod(methodStr(FormStringControl,lookup),methodStr(BEHCMReviewUIBuilder,PerfPeriodIdLookup),this);
       
    }

    public void postRun()
    {
    
    }

 
    private void PerfPeriodIdLookup(FormStringControl divisionCodeLookup)
    {
        Query                   query = new Query();
        QueryBuildDataSource    qbd, qbdPerson;
            QueryBuildDataSource qbds;
        QueryBuildDataSource qbdsJoin;
        SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(HcmPerfPeriod), divisionCodeLookup);
        qbds= query.addDataSource(tableNum(HcmPerfPeriod));
          sysTableLookup.parmQuery(query);
           sysTableLookup.addLookupfield(fieldNum(HcmPerfPeriod, PerfPeriodId), true);
     
        sysTableLookup.parmQuery(query);
        sysTableLookup.parmUseLookupValue(False);
        sysTableLookup.performFormLookup();
    }

    private void divisionCodeLookup(FormStringControl divisionCodeLookup)
    {
        Query          query;
        QueryBuildDataSource  qbds,qbds1;
        SysTableLookup     sysTableLookup;
        DimensionAttribute   dimAttr;
        ;
        sysTableLookup = SysTableLookup::newParameters(tablenum(OMOperatingUnit),divisionCodeLookup);
        sysTableLookup.addLookupfield(fieldnum(OMOperatingUnit, OmoperatingunitNumber));
        sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit,Name));
        query = new Query();
        qbds = query.addDataSource(tableNum(OMOperatingUnit));
        qbds.addRange(fieldNum(OMOperatingUnit, OMOperatingUnitType)).value(queryvalue(OMOperatingUnitType::OMDepartment));
        sysTableLookup.parmQuery(query);
        sysTableLookup.parmUseLookupValue(False);
        sysTableLookup.performFormLookup();
    }

}

Currency Exchange Rate, Currency Exchange Rate Provider MSDyn365FO Dynamics 365 for Finance and operations

September 1, 2018 by alirazazaidi

Hi all, Microsoft provide 3 currency Exchange rate providers, With these provider we get latest currency Exchange rates in Dynamics 365 for finance and operations. These exchange rates used when We required transactions in different currencies.  In the current web cast I used one of Exchange rate provider get latest exchange rates. Its works excellent in my local laptop hosted VM. My English is improving day by day so bear with me.

Process Busy Indicator D365 for finance and operations

January 25, 2018 by alirazazaidi

Hi All, today I have small tip, During development, I have to process a lot of records. During this , I need Busy screen process indicator.

 

I used following code snippet to create progress busy indicator.

 

For this I have to do following changes in my Class method (Business logic).

  1. Convert required method to Static
  2. Parameter is changed to Container and then required parameter extract from container inside the method.

 

 

So my required method become something like

 

 

Class myProcess

{

 

 

Public static void RunmyProcess(Container _C)

{

Str _Value = conpeek(_C,1);

 

 

 

}

 

}

 

 

 

class RunBtnProcess

{

/// <summary>

///

/// </summary>

public void clicked()

{

 

container _Xyz=[TableName.FieldValue];

super();

SysOperationSandbox::callStaticMethod(classNum(myProcess),
staticMethodStr(myProcess,RunmyProcess),_Xyz, 
'Ledger Record in process', 'Operation completed');

 

 

}

 

}

Reference : Internet.

Custom financial Dimension shows in lookup D365 for Finance and operations

August 19, 2017 by alirazazaidi

I one of last post, I added the custom financial dimension in D365 for finance and operations.
You can find this post here
https://www.tech.alirazazaidi.com/custom-financial-dimension-in-dynamics-365-for-finance-and-operations-ax-7/

In next post I load financial dimension in custom lookup.

Custom lookup for Financial Dimension D365 for Finance and Operations (Dynamics Ax 7)

But above link shows only out of the box financial dimensions. But what about custom financial dimension,

I tested the following code snippet works custom dimension. It load custom dimension mentioned in

Custom Financial Dimension in Dynamics 365 for Finance and Operations (AX 7)


[FormControlEventHandler(formControlStr(FrmTestDetail, FormStringControl1), FormControlEventType::Lookup)]
public static void FormStringControl1_OnLookup(FormControl sender, FormControlEventArgs e)
{

SysTableLookup sysTableLookup;
Query query;
QueryBuildDataSource qbdsDimensionFinancialTag;
QueryBuildRange qbrFinancialTagCategory;
String20 LC;
RecId _recid;
DimensionAttribute _attribute;
Name _name=’jaggah_tax’;

;
// super();

//#define.MyCustomFinancialDimension(‘LC’)
// select * from attribute where attribute.Name ==_name;
// recid = attribute.financialTagCategory();

query = new Query();
qbdsDimensionFinancialTag = query.addDataSource(tableNum(DimensionFinancialTag));
qbrFinancialTagCategory = qbdsDimensionFinancialTag.addRange(fieldNum(DimensionFinancialTag, FinancialTagCategory));
qbrFinancialTagCategory.value(strFmt(‘%1’, DimensionAttribute::findByName(_name, false).financialTagCategory()));

sysTableLookup = sysTableLookup::newParameters(tableNum(DimensionFinancialTag), sender,true);
sysTableLookup.addLookupfield(fieldNum(DimensionFinancialTag, Value), true);
sysTableLookup.addLookupfield(fieldNum(DimensionFinancialTag, Description));
sysTableLookup.addSelectionField(fieldNum(DimensionFinancialTag, FinancialTagCategory));
sysTableLookup.parmQuery(query);

sysTableLookup.performFormLookup();

FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs;
//cancel super() to prevent error.
ce.CancelSuperCall();

}

Output is here

Data manipulation tip 1 In Dynamics ax 2012 and D365 Of Operations Data copy method.

April 9, 2017 by alirazazaidi

 

Currently I am doing Report development project, I got some tips for Data manipulation , these tips I recently learned.

 

Copy data from one table buffer to other of same type.

 

 

During report development, We usually populate  temp table with result of Query execution. Usually we need copy of same data for aggregate functions.

 

Instead map each field of buffer with each other. We can copy the whole data by using .data method.

 

 

Suppose we have custom temp table CustSaleQtyTmp which we need to copy from one buffer to other.

class DataManipulationJob
{
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{

CustSaleQtytmp _temp1,_temp2;
_temp1.IntQty=100;
_temp1.CustAccount =”Cust00001″;
_temp1.insert();
_temp1.IntQty=200;
_temp1.CustAccount =”Cust00002″;
_temp1.insert();

_temp1.IntQty=300;
_temp1.CustAccount =”Cust00003″;
_temp1.insert();
while select * from _temp1
{
// Instead copy like this we can use Data method
// _temp1.CustAccount = _temp2.CustAccount;
// _temp1.IntQty = _temp2.IntQty;

_temp2.data(_temp1);
_temp2.insert();

}

while select * from _temp2
{
info( ” _temp2 with ” + _temp2.CustAccount + ” ” + int2Str(_temp2.IntQty));

}
}

}

output like

Design/Controls/Filtergrp’ is missing child ‘Quick Filter new Dynamics Ax 7

October 18, 2016 by alirazazaidi

While building Dynamics Ax 7 simple list page, I got following error on compiling.

 

Severity                Code      Description         Project  File         Line

Error                     Path: [AxForm/AXEarningCodeGroup/Design/Controls/Filtergrp]:Control ‘AxForm/AXEarningCodeGroup/Design/Controls/Filtergrp’ is missing child ‘Quick Filter’ required by pattern ‘Custom and Quick Filters’.   CustomPayroll (USR) [CustomPayroll] C:\AOSService\PackagesLocalDirectory\ApplicationSuite\CustomPayroll1\AxForm\AXEarningCodeGroup.xml               0

 

In short

Design/Controls/Filtergrp’ is missing child ‘Quick Filter

 

Something different then Dynamics Ax 2012. Yes, just right click on add a group and the add Quick Filter.

2016-10-18_20-37-22

 

pattern

 

No other property I found, After solution compiled without any error.

Customization in New Dynamics AX (AK 7) Part 3- Form and Table Extensions.

July 30, 2016 by alirazazaidi

 

 

In new Dynamics Ax, the extensions are created for extension. Previously we use overlay or overwrite change in Out of the box Dynamics Ax object. For example, if we have to add some fields or modification we are overlay or adding changes in original Object. Object is overwrite in configured layer. But in new Dynamics Ax we create extensions. And we added changes in extension. And run time all these extension run as single object.

 

This is post is third in series, you can also view previous two posts as follow.

Customization In New Dynamics Ax (AX 7) Part 1 – Creating New Model

http://tech.alirazazaidi.com/customization-in-new-dynamics-ax-aka-7-create-new-module/

 

 

 

Consider the scenario, that we writing our custom payroll and here is customer wants direct two 3 fields in Worker details.

  • National Identification Number.
  • Passport Number.
  • Passport Expire date.

 

For this we create extensions and add required fields in table. So expand Tables in Application explorer.     Right click on WorkerPersonalDetail table and click on extension.

Table extension2

 

 

 

 

 

 

New extension is created and double click on it a
ExtensionDetails

 

 

Before that Right click on Project and set Data Base Synchronize properties true.

Visual Studio Properties

 

New added two string of length 20 character and added expire date and set extended data type of FromDate.

GroupDetails

Add new group

NewGroup

 

 

Set properties

PasportGroup

Drag new fields in it.

GroupDetails

Now build project to synchronized to data base.

 

Now expand Forms and HcmWorker and creates it extension.

FormExtension

 

Double click on form extension and open it in designer

 

Expand

 

 

Expand he deign portion until you reach the control, where you want to add required field. for example I want to add New fields in PersonDetail section.

ExpandDesigner

 

Expand profile Tab page and add new group as NIC and Passport.

FormNewGroup

Set its data source and data group as follow

New Fields

Save and Run Project by Ctrl+ F5.

Detail Page

 

On click and edit mode

 

Edit

 

Now we add values and save them

Values Save

Customization in New Dynamics Ax (Aka 7) Part 2- Create New Module

July 26, 2016 by alirazazaidi

This post is continuity of

Customization In New Dynamics Ax (AX 7) Part 1 – Creating New Model

In Dynamics New module is a Menu,

 

In this post we are Creating A new module In Dynamics where we add complete implementation.

 

So first step to create a menu Item

CustomMenu

Double click on menu and open it in design area,

 

 

 

 

Designer

 

and then right click on it and update its name and label as follow

MyCustomPayrollProperties

Now add new Menu item,

menuDisplay

 

and Set its form properties to HCMWorker.

 

MenuDisplayProperties

 

 

 

Now drag open again menu in Design screen and drag display menu from solution explore and save it.

Drag

 

Now expand the Main menu in AOT and right click on it and click on generate Extension in current project

Extension

 

You can see new extension in with MainMenu.Extension in solution explorer.

New Extension In Solution Explorer

 

 

Double click on It and open it in designer and then right click on it to create a new menu reference

 

NewReference

 

 

ReferenceMenuName

 

 

 

Rename reference menu and set its menu properties to Menu which we create in previous step.

 

ReferenceProperties

 

Because we are doing this is post is as introduction, so we set display menu target to HCMWork set it as starting object in Visual studio project.

 

VisualStudioProject

Now compile, and Run Project With Ctrl+F5.

You can find our custom menu is appeared in Main menu.

MainMenu

 

 

 

 

 

 

 

 

Customization In New Dynamics Ax (AX 7) Part 1 – Creating New Model

July 26, 2016 by alirazazaidi

Currently I am explore my Dynamics Development Skills in new Dynamics AX (Aka AX 7). So I decide to write series of post.

So first post is about creating Model and visual studio project.

Open Visual studio but did not create project, first step is Create new model. For this click on Dynamics AX menu and click on Create Model.

2016-07-25_1-24-11

 

 

Suppose we write our custom payroll so I wrote Model name with payroll.

 

Write some something in Model Description.

2016-07-25_1-35-16

In next step select Application suit.

Application Setup

Select and click on next.

 

Let this step to complete it, it will ask you to create a new Visual studio Project Select that option to create a new project, set its name Custom Payroll.

Dynamics Ax solution

 

 

Next Page »

Primary Sidebar

About

I am Dynamics AX/365 Finance and Operations consultant with years of implementation experience. I has helped several businesses implement and succeed with Dynamics AX/365 Finance and Operations. The goal of this website is to share insights, tips, and tricks to help end users and IT professionals.

Legal

Content published on this website are opinions, insights, tips, and tricks we have gained from years of Dynamics consulting and may not represent the opinions or views of any current or past employer. Any changes to an ERP system should be thoroughly tested before implementation.

Categories

  • Accounts Payable (2)
  • Advance Warehouse (2)
  • AI (1)
  • Asset Management (3)
  • Azure Functions (1)
  • Books (6)
  • Certification Guide (3)
  • ChatGPT (2)
  • Claude (1)
  • Customization Tips for D365 for Finance and Operations (62)
  • D365OF (60)
  • Data Management (1)
  • database restore (1)
  • Dynamics 365 (59)
  • Dynamics 365 for finance and operations (139)
  • Dynamics 365 for Operations (174)
  • Dynamics AX (AX 7) (134)
  • Dynamics AX 2012 (274)
  • Dynamics Ax 2012 Forms (13)
  • Dynamics Ax 2012 functional side (16)
  • Dynamics Ax 2012 Reporting SSRS Reports. (31)
  • Dynamics Ax 2012 Technical Side (52)
  • Dynamics Ax 7 (65)
  • Exam MB-330: Microsoft Dynamics 365 Supply Chain Management (7)
  • Excel Addin (1)
  • Favorites (12)
  • Financial Modules (6)
  • Functional (8)
  • General Journal (1)
  • Implementations (1)
  • Ledger (1)
  • Lifecycle Services (1)
  • Logseq (4)
  • Management Reporter (1)
  • Microsoft Excel (4)
  • MS Dynamics Ax 7 (64)
  • MVP summit (1)
  • MVP summit 2016 (1)
  • New Dynamics Ax (19)
  • Non Defined (9)
  • Note taking Apps (2)
  • Obsidian (4)
  • Personal Knowledge Management (3)
  • PKM (16)
  • Power Platform (6)
  • Procurement (5)
  • procurement and sourcing (6)
  • Product Information Management (4)
  • Product Management (6)
  • Production Control D365 for Finance and Operations (10)
  • Sale Order Process (10)
  • Sale Order Processing (10)
  • Sales and Distribution (5)
  • Soft Skill (1)
  • Supply Chain Management D365 F&O (5)
  • Tips and tricks (278)
  • Uncategorized (165)
  • Upgrade (1)
  • Web Cast (7)
  • White papers (4)
  • X++ (10)

Wiki

  • SCM

Copyright © 2026 · Magazine Pro On Genesis Framework · WordPress · Log in