• 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

New Dynamics Ax

Relation between PurchLine and PurchReqline Tables in Dynamics AX 2012 R3.

November 9, 2017 by alirazazaidi

In one of SSRS Report requirement, client wants to see Purchase order quantity, Invoice Quantity against items purchase requisition Quantity.

 

Instead of writing a query on ItemId and InventdimId, I found out of the box function In PurchReqLine table. This method return the reference of Purchline. With reference of Purchline, I can get Purchase order Number and get Item Invoiced quantity.

 

PurchLine       purchLine;

PurchReqLine reqline;

 

_purchLine = reqline.purchLine();

 

 

The relationship between Purchline and PurchReqline is RecId, Purchline contains the Reference RecId of PurchReqline.

 

PurchLine       purchLine;

 

if (this.PurchId && this.LineRefId)

{

select firstonly purchLine

where purchLine.PurchId           == this.PurchId    &&

purchLine.PurchReqLineRefId == this.LineRefId  &&

!purchLine.IsDeleted;

}

Free introductory course on MVA for Dynamics 365 for finance and operations, enterprise edition.

October 31, 2017 by alirazazaidi

Do you want to introductory session, then this course is for you. Yes it is free any one can watch very basic level course on Microsoft Virtual Academy

https://mva.microsoft.com/en-US/training-courses/introduction-to-microsoft-dynamics-365-for-finance-and-operations-enterprise-edition-17908?l=AHneoTOJE_906312570

Course contents are amazing.

 

 

  •  Course Introduction Time00:01:3701 | Overview
  •  Cloud-Based Solution Time00:02:02
  •  Workspaces Driving Productivity Time00:02:48
  •  Workflows in Your Business Processes Time00:03:34
  •  Reporting Time00:01:12
  •  Industry Focus Time00:02:2902 | Introduction to Functionality
  •  Overview Time00:02:55
  •  Order-to-Cash Time00:00:33
  •  Demo: Order-to-Cash Functionality Time00:07:38
  •  Procure-to-Pay Time00:00:32
  •  Demo: Procure-to-Pay Functionality Time00:08:16
  •  Plan-to-Produce Time00:00:42
  •  Demo: Plan-to-Produce Functionality Time00:05:19
  •  Recruit-to-Hire Time00:00:59
  •  Demo: Create Jobs, Positions, and Recruitment Projects Time00:10:21
  •  Complete an Application and Hire a Worker Time00:00:11
  •  Demo: Complete an Application and Hire a Worker Time00:08:08Post-Course Survey
  •  Post-Course Survey (Optional) Assessment: Full Course
  •  Assessment: Full Course

Workflow Approve Name  in Grid Dynamics Ax 2012 R3

September 28, 2017 by alirazazaidi

Small tip, with reference at the end of post. I got small task, User want Last approval Name in grid at the result.

I wrote following code snippet as method in a required table and bind it to grid field.

 

display Name LastApprovalName()

{

WorkflowTrackingStatusTable workflowTrackingStatus;

WorkflowTrackingTable workflowTrackingTable;

WorkflowTrackingCommentTable workflowTrackingCommentTable;

UserInfo userInfo;

RecId _recId;

Name _name;

_recId=5637145391;

select firstFast RecId, User from workflowTrackingTable

order by RecId desc

join workflowTrackingCommentTable

where workflowTrackingCommentTable.WorkflowTrackingTable == workflowTrackingTable.RecId

join UserInfo

where UserInfo.id == WorkflowTrackingTable.User

exists join workflowTrackingStatus

where workflowTrackingTable.WorkflowTrackingStatusTable == workflowTrackingStatus.RecId

&& workflowTrackingStatus.ContextRecId == this.RecId

&& workflowTrackingStatus.ContextTableId == tableNum(MyTablelRequestTable) //PurchTable

&& workflowTrackingTable.TrackingType == WorkflowTrackingType::Approval;

if (workflowTrackingTable.RecId > 0)

{

_name=userInfo.name;

 

}

else

{

_name='';

}

return _name;

}

 

 

 

Original Code snippet is https://community.dynamics.com/ax/b/amazingax1/archive/2016/04/28/microsoft-dynamics-ax-2012-get-workflow-last-approver-name-and-approved-date

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

Dynamics 365 For Finance And Operations On Perm Demo Video

August 17, 2017 by alirazazaidi

I just completed first video. 9 minute video just explore the navigation of D365 for finance and operations.

Dynamics 365 For Finance And Operations On Perm Demo from alirazazaidi on Vimeo.

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

Customization in New Dynamics Ax (Aka AX 7) Part 5 – Custom forms – Simple List Page.

September 13, 2016 by alirazazaidi

 

This post is series. In Last post we create some custom tables for  in Dynamics Ax.

Customization in New Dynamics AX (AK 7) Part 4- Custom Tables

In basic level we create two tables EarningCodeGroup and Earning Code. In this post we build simplest and very basic level forms.

 

Open the project and add a new Item and select Form  from “Add New Item “ Dialog and set its Name “AlEarningCodeGroup”

2016-09-13_22-36-57

 

New form will be created in solution explore. Double click on it and open it in design mode.

FormDesign

 

 

Now right click on right side and select form Pattern.

Apply Pattern

From pattern select Simple list pattern.

You can read more details about simple list in the following

https://ax.help.dynamics.com/en/wiki/simple-list-form-pattern/

 

Patterns are applied but it described the following controls are missing.

Missing Controll

 

 

 

Now again right click on designer on and add action pane, custom filter group and grid.

Add new control

 

In first step I add the Action tab, then Add Action tab Pane page and then Button group and then add three command button.

ActionTab

 

Now update the different properties of Action Pane, tab strip and command button.

Change default to strip

Strip stryle

Set Caption as Home

Now select first command button set its text as New and command button as New.

Command Button Properties

Similarly set other two command button as Edit, and delete.

Now again right click on design and also add  group and rename it to grpFilter

Also right click on custom filter group and apply pattern We will see this in next post.

ButtonFitler

 

Now add Grid so form pattern requirement will be complete. Rename It to grpEarningCodeGroup. After that form design look like

Validated FormPattern

 

Now we go back to add table as a data source. We created the AxEarningCodeGroup in previous post, we will use that table here.

Grid data source

 

 

 

 

Set Name it with your table name, select table and set insertIfEmpty property to no.

DataSourceProperty

Now go back and expand action pane => Pane and then button group  and update datasouce property to table  property to  AlEarningCodeGroup

Button Group DataSource property

 

 

 

Now right click on grid and press F4 or open property window and set datasource to AxEarnigCodeGroup and datagroup to grid (I created the field group with Name “Grid” In previous post”.

Grid dDaou

 

If you see, you find two fields are added under grid node

 

Grid fields

 

 

 

Now go back to solution explorer and create a new menu Item of type display

DisplayMenu

Name It as “AlEarningCodeGroupMenu” . New menu Item will be added on solution explorer. Double click on it to open it in design mode and Set Object Type to form and Object to AlFormEarningCodeGroup. Also Update its label Property to “Earning code Group”.

DisplayMenuProperty

 

Open the AlEarningCodeGroup table in designer window and set its form ref to AlFormEarningCodeGroupMenu This will help us to add earning code group in earning code entry form.

Table Propeperties

 

 

Now we add the menu Item in  Menu to run and display,  For this open the menu Item in designer mode and drag menu item created in above step. In this post I am using custom Menu, If you are working with out of box menu then you must create menu extension then drag the menu Item in it.

Menu Display

 

Now run the application with Ctrl F5, I found the earning Code group in menu.

Live menu

 

By Clicking on link, forms open and I did following entries.

 

Data Entry

 

 

 

 

 

Setup Currency Exchange rate in Ledger Dynamics Ax 7

June 8, 2016 by alirazazaidi

2016-06-08_20-14-42

 

Ledger Setup

Chane

 

Rate Update

 

 

Page can not be display -The description for Event ID 110 from source Microsoft Dynamics AX cannot be found new Dynamics AX 7

March 21, 2016 by alirazazaidi

During development suddenly Ax stop working. When I try to connect web url https://usnconeboxax1aos.cloud.onebox.dynamics.com. It shows page can not display. Previously it was working fine.

On Event viewer I found following exception.

 

The description for Event ID 110 from source Microsoft Dynamics AX cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

 

If the event originated on another computer, the display information had to be saved with the event.

 

The following information was included with the event:

 

AX is shutting down due to an error.

Duplicate metadata element has been detected in multiple modules. Please verify that application is deployed correctly and installed modules are compatible. Following elements are defined in more than one module:

Element AxService/tstColorService is defined in the following modules: ServiceTest, ApplicationSuite

 

Solution: During development I created artifacts with same name in different models on different occasions. Surprisingly no warning or error appears during development about object of same name already exists in AOT. I open required solution rename artifacts and build solution. AX web application start working again.

« Previous 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