• 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

Ali Raza Zaidi

A practitioner’s musings on Dynamics 365 Finance and Operations

Dynamics AX (AX 7)

List of Vendor Invoices against Payment General Entry

May 15, 2019 by alirazazaidi

Between posted Vendor Payment Journal and Settled Invoice only relation is Voucher number in ledger Journal Trans and VendSettlement Table.

So My friends my code snippet is here,

        VendTrans               vendTrans;

        VendSettlement          VendSettlement;

  while select * from VendSettlement

                join  * from vendTrans

                where VendTrans.DataAreaId == VendSettlement.TransCompany

                && VendTrans.RecId  == VendSettlement.TransRecId

                && VendTrans.AccountNum == VendSettlement.AccountNum

                && VendSettlement.OFFSETTRANSVOUCHER == _ledgerJournalTrans.Voucher

Haaapy Daxinggg

The field with ID ‘0’ does not exist in table Dynamics 365 For finance and operations

April 11, 2019 by alirazazaidi

Hi all, I face this error, while extended existing custom report. I added some fields in temp table, after update logic in dp class, On report data set update.

But at run time report shows this error. While debugging the code, I found the error occur on mapping the new fields in temp table.

 

Solution :

I build the whole model. After that error was removed.

 

An error occurred during report data sets execution D365 For finance and operations

April 11, 2019 by alirazazaidi

Hi all, small tip. I faced this issue, when I extend the custom report in D365 for finance and operations. During development on onebox

 

 

Solution was simple,

  • restart IIS services
  • Restart Reporting Services.

Happy Daxing.

How to copy financial dimension form one object to other. Dynamics 365 For finance and operations

March 27, 2019 by alirazazaidi

Hi all, In some cases we can need to copy  financial dimension from one object to  other for example Customer to Sales order or Vendor to purchase order.

In Ax 2012  it little easy. But in D365 For finance and operations, it is little bit tricky.

 

I did this with following code snippet.  With the help of out of box. LedgerDimensonDefaultFacade class i used the merge default dimension method and passed same table dimension in form and to dimension.

Result is interesting.

 

 

 salestable.DefaultDimension= LedgerDimensionDefaultFacade::serviceMergeDefaultDimensions(CustTable.DefaultDimension,CustTable.DefaultDimension);

Calling menu name in Extensions Dynamics 365 for finance and operations

March 23, 2019 by alirazazaidi

In Ax 2012 we get menu name with element.Args().CallMenu name, using  taking decision on menu name.

 

But same logic we need to apply in Extension. But in D365 For finance and operations we did not overlay. Following code snippet helps me to implement similar logic in Extension.

 

 

[ExtensionOf(formStr(CustTable))]

final class IaLogisticsContactInfoGrid_Extension

{

 

 

/// <summary>

///

/// </summary>

/// <param name=”sender”></param>

/// <param name=”e”></param>

[FormEventHandler(formStr(LogisticsContactInfoGrid), FormEventType::Initialized)]

public static void LogisticsContactInfoGrid_OnInitialized(xFormRun sender, FormEventArgs e)

{

 

FormRun formRun = sender;

 

;

 

info(formRun.args().menuItemName());

}

 

}

Journal name . does not support journal type Daily X++ Dynamics 2012 r3

March 23, 2019 by alirazazaidi

Hi did one customization, where I create Ledger Journal using X++ code. It was working perfectly fine with Ledger General Ledger entries. But threw error  on creating Ledger for AR,PR Payment.

 

I created ledger with following code snippet.  But it works only for Ledger for of Type Daily

 

AxLedgerJournalTable    header  = new AxLedgerJournalTable();
AxLedgerJournalTrans    trans   = new AxLedgerJournalTrans();

container               offsetDim;
LedgerJournalNameId     ledgerJournalNameId = “payment”;

header.parmJournalName(ledgerJournalNameId);
header.parmJournalType(LedgerJournalType::CustPayment);
header.save();

I replaced the above code with following snippet it works perfectly fine, rest of the code is works fine

LedgerJournalName ledgerJournalName;
LedgerJournalTable ledgerJournalTable;
LedgerJournalTrans ledgerJournalTrans;

select firstonly ledgerJournalName
where ledgerJournalName.JournalName == parameters.LedgerJournalNameId &&
ledgerJournalName.JournalType == LedgerJournalType::CustPayment;
if(!ledgerJournalName.RecId)
throw error(“@CAM184”);
if(ledgerJournalName)
{
ledgerJournalTable.JournalName = ledgerJournalName.JournalName;
ledgerJournalTable.Name = ledgerJournalName.Name;
ledgerJournalTable.insert();
}

In keyword While select statement X++ Dynamics 365 for finance and operations

March 20, 2019 by alirazazaidi

Hi  Today I found very interesting post here , where we can use “In” keyword for While select or Select statement.

in will be enum based.

SalesTable  salesTable;
container   con = [SalesType::Sales, SalesType::ReturnItem, SalesType::Subscription];
while select * from salesTable
where salesTable.SalesType in con
{
Info(salesTable.SalesId);
}
reference :

https://allaboutmsdynamics.wordpress.com/2019/02/18/d365-ax7sql-in-operator-in-x-where-clause-enum-fields-only/

Paging in Query X++ Dynamics 365 for finance and operations

March 4, 2019 by alirazazaidi

For paging in X++ Query. There are three steps required. Rest of Query Code is same.

We have to set following things in Query data source

  • Set Sort field in Query data Source.
  • Paging position property of QueryRun is set to true.
  • Add page range with starting position and number of records in QueryRun

Here is code snippet

 

  QueryBuildRange qbr,qbrStartDate,qbrEndDate;
QueryBuildDataSource qbd;
IAPageSize EnumPageSize;

QueryRun        qr;

Query           query = new Query();

Int pageSize = 2;

 

qbd = query.addDataSource(TableNum(ProjPlanVersion));
qbd.addOrderByField(fieldNum(ProjPlanVersion,HierarchyId));

qr = new QueryRun(query);

qr.enablePositionPaging(true);
            CurrentPageNumber =1;
            startingposition = CurrentPageNumber * pagesize;
            qr.addPageRange(startingposition, totalRows);
while(qr.next())

 

{

 

Info (“”);

}

Cannot stop DynamicsAxBatch service on computer Dynamics 365 for finance and operations

February 23, 2019 by alirazazaidi

I still like the Idea shared by “Gary Vaynerchuk ” Post ” Document dont create” So I document what I face today and resolved.

 

Today I am facing Project compilation Error in Visual studio output pane, I am struggling to understand Table control, so I can meet the development of my next assignment.  Error was

 

 

 

Severity        Code        Description        Project        File        Line        Suppression State

Error                One or more errors occurred. —> System.InvalidOperationException: Cannot stop DynamicsAxBatch service on computer ‘.’. —> System.ComponentModel.Win32Exception: The service cannot accept control messages at this time

— End of inner exception stack trace —

at System.ServiceProcess.ServiceController.Stop()

 

When I open Services, I found that DynamicsAXBatch services is in stopping mode and stuck.

 

So I killed the service process with CMD command. “taskkill /f /pid [pid number]”

 

The message already shows the service name. ” DynamicsAXBatch” You can copy it from Service detail dialog.

 

So Open CMD with run as administrator and run the following command and get  pid

 

sc queryex DynamicsAxBatch

 

Now I have IP.

 

And kill the Process Id

 

taskkill /f /pid 5352

 

Now I start the service again.

Project is successfully complied.

 

Dynamics Ax 2012 R3 Contoso Demo VM license 2019

February 22, 2019 by alirazazaidi

Today I need to explore some control sample in Dynamics ax 2012 R3. For opening Ax 2012 r3 on my machine, I need a demo license.

I found demo license for 2019 on following location.

« Previous Page
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)
  • Asset Management (3)
  • Azure Functions (1)
  • Books (6)
  • Certification Guide (3)
  • Customization Tips for D365 for Finance and Operations (62)
  • D365OF (59)
  • Data Management (1)
  • database restore (1)
  • Dynamics 365 (58)
  • Dynamics 365 for finance and operations (135)
  • Dynamics 365 for Operations (165)
  • 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)
  • Implementations (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 (3)
  • Personal Knowledge Management (2)
  • PKM (13)
  • Power Platform (6)
  • Procurement (5)
  • procurement and sourcing (5)
  • Product Information Management (4)
  • Product Management (6)
  • Production Control D365 for Finance and Operations (10)
  • Sale Order Process (10)
  • Sale Order Processing (9)
  • Sales and Distribution (5)
  • Soft Skill (1)
  • Supply Chain Management D365 F&O (3)
  • Tips and tricks (278)
  • Uncategorized (165)
  • Upgrade (1)
  • Web Cast (7)
  • White papers (4)
  • X++ (7)

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