• 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 2012 Technical Side

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;

}

Dynamics Ax 2012 Project Types and Time and Material Video

October 5, 2017 by alirazazaidi

Hi All I found very interesting video about Project Management and accounting module of Dynamics 2012 R3 by Santosh kumar Singh. Video is worth to share.

 

 

float value conversion in string SSRS expression and decimal points SSRS dynamics ax 2012 R3.

September 29, 2017 by alirazazaidi

 

 

Today I have to record very small tip. During development of on SSRS report for Dynamics Ax 2012 R3, End user wants a row at the report footer for  analysis. he wants some kind of percentage  calculation with ‘%’.  A For this I have to use CStr ssrs expression function  like

 

Ctr(((sum(DataSet!field.Value) / sum(DataSet!field.Value)))*100)+”%”.

 

Now it is string and shows number of decimal as it result from division. For example  5.4356333. But end user wants formatting like 5.43 .

It is string or text value and SSRS textbox formatting is not apply on it.

 

Following SSRS expression works for me.

 

 

 

Left(CStr(5.4356333),instr(CStr(5.4356333),”.”)+2)

 

 

My Updated expression is something like this

 

Left(CStr(IIF(Parameters!ProductionReportBM2DS_ItemName.Value = “ITEM-00000420”,((sum(Fields!Scrap.Value)/sum(Fields!TotalConsumption.Value))*100),((sum(Fields!CutLength.Value)/sum(Fields!TotalConsumption.Value))*100))),instr(CStr(IIF(Parameters!ProductionReportBM2DS_ItemName.Value = “ITEM-00000420″,((sum(Fields!Scrap.Value)/sum(Fields!TotalConsumption.Value))*100),((sum(Fields!CutLength.Value)/sum(Fields!TotalConsumption.Value))*100))),”.”)+2) +”%”

Dynamics Ax 2012 R3 Check list dialog did not Post Installation or Upgrade

December 5, 2016 by alirazazaidi

After upgrade process, Dynamics Ax checklist dialog did not let me do anything. 2016-11-24_21-51-51

 

So closed the Ax client and in Windows command prompt, I run following command. Remember, run Windows command prompt as run as administrator.

 

AXUTIL set /noinstallmode

Now open Dynamics Ax client and perform following steps.

  • Synchronize the database.
  • Full compile and resolve any error.
  • Generate Full CIL.

 

Current user and its employee Name and department

October 19, 2015 by alirazazaidi

Today I got small requirement where I have to pick and display current log in user Name, Following code snippet helps me

static void curUserInfo(Args _arg)
{
    str sUserId;
Name  name;
str departmentName
;

    ;
    sUserId = curUserId();
    info( "Current user ID is " + sUserId );
name= HcmWorker::find(DirPersonuser::findUserWorkerReference(sUserId)).name();
 departmentName=    HcmWorker::find(DirPersonuser::findUserWorkerReference(sUserId)).primaryDepartmentName();
info ("Name is " + name);

}

RDP or Business logic based SSRS Reports in Dynamics Ax 2012 R3.

July 8, 2015 by alirazazaidi

RDP or Business logic based SSRS Reports in Dynamics Ax 2012 R3.

 

Logic based report in MS Dynamics Ax 2012 can be develop in following steps

 

  1. Create a temporary table
  2. Define the report parameters
  3. Add business logic for the report
  4. Create a reporting project
  5. Bind a report to a report data provider class

 

In graphical shape RDP reports will be as

Code Based Report

Image Inspiration http://dynamics-ax.blogspot.com/2011/12/ax-2012-ax-ssrs-report-design-concepts.html

 

 

Now consider a scenario, where we have to display list of Item, quantity, Price and total amount sold to customers. It is relatively simple report but have to build this report based on RDP or Report Data Provider framework.

 

First step to open an Ax client. When Ax client open press Ctrl + shift +W keys to open Dev environment or AOT.

 

For all artifacts for report development will be a single place and we did not move to node to node in AOT we have to create a AX project.

 

You can find projects at View=>Projects => Public project.

Create a new project at and rename it with “CustomRDBReport”

ss

 

 

 

Step 1 create a temp table.

The major step in RDP report is decision the fields require in report, create a temp table and add these field in temp table. For current example what fields we required on report are as follow

 

  • CustomerAccount
  • CustomerName
  • ItemId
  • ItemName
  • SalesPrice
  • SalesQuantity
  • SalesAmount

 

If we see these fields exists in SalesLine Table. So we drag them into our temp table, and rename them accordingly

Right click on project and create at table with Name “CustomerSalesTemp”,

TableCreation

 

From property window rename the table as “CustomerSalesTemp” and set  TableType to   tempDb

TempDb

 

Now close all window, open AOT and opens salesLine table. From top menu click on windows => Tile and both tables comes in parallel to each other

Tiltle

and start drag and drop fields in temp table

Drag fields

Now save the table and rename the fields accordingly if required. Also add a new field with Name CustomerName with extended data Type with Name.

 

 

Right click compile and synchronize table.

 

 

 

 

Now create a AOT Query with Name QSalesLine. Add data source on SalesLine and Add following fields on Salesline table

QSalesLine

 

For Date Fileter, we will use ShippingDateConfirmed on Date.

Safe this query.

 

Step 2 define the report parameters

For current report we required three parameters, Customer, From date and To date.

In Report Data Provider framework which is based on WCF, we have to create a data contract class.

Create a new class in, rename it, CustomerSalesDataContract.

In its declaration section create three variables

 

[DataContractAttribute]

class CustomerSalesDataContract

{

CustAccount CustomerAccount;

TransDate FromDate;

TransDate ToDate;

}

 

 

 

Now Create three data method

[

DataMemberAttribute(identifierStr(CustAccount)),

SysOperationLabelAttribute (“Customer Account”),

SysOperationHelpTextAttribute(“Customer Account”),

SysOperationDisplayOrderAttribute(“1”)

]

public CustAccount  parmCustomerAccount(CustAccount  _CustomerAccount = CustomerAccount)

{

CustomerAccount = _CustomerAccount;

return CustomerAccount;

}

 

 

[

DataMemberAttribute(identifierStr(FromDate)),

SysOperationLabelAttribute (“From Date”),

SysOperationHelpTextAttribute(“FromDate”),

SysOperationDisplayOrderAttribute(“2”)

]

public TransDate  parmFromDate(TransDate  _FromDate = FromDate)

{

FromDate = _FromDate;

return FromDate;

}

 

 

[

DataMemberAttribute(identifierStr(ToDate)),

SysOperationLabelAttribute (“To Date”),

SysOperationHelpTextAttribute(“To Date”),

SysOperationDisplayOrderAttribute(“3”)

]

public TransDate  parmToDate(TransDate  _ToDate = ToDate)

{

ToDate = _ToDate;

return ToDate;

}

 

 

 

 

Step 3 Add business logic for the report.

In Report data provider framework we have to write Data provider classes, which contain business logic to populate temp table. For this we have to add create a new class “CustomerSalesDataProvider”

Extend this class SRSReportDataProviderBase

 

 

[

 

SRSReportParameterAttribute(classstr(CustomerSalesDataContract))

]

 

class CustomerSalesDataProvider extends  SRSReportDataProviderBase

{

CustomerSaleTemp _CustomerSaleTemp;

}

 

 

This Class two method, first is return the temp table, and second one is which contains the logic to populate  temp table.

 

[SRSReportDataSetAttribute(“CustomerSaleTemp”)]

public CustomerSaleTemp getCustomerSaleTemp()

{

select * from _CustomerSaleTemp;

return _CustomerSaleTemp;

}

 

 

 

public void processReport()

{

TransDate _FromDate;

TransDate _Todate;

AccountNum _CustAccount;

CustomerSalesDataContract dataContract;

 

Query query;

QueryRun queryRun;

QueryBuildDataSource queryBuildDataSource;

QueryBuildRange queryBuildRange;

QueryBuildRange ShippingDateConfirmedFilter;

SalesLine querySalesLine;

 

 

query = new Query(queryStr(“QSaleLine”));

dataContract = this.parmDataContract();

_CustAccount = dataContract.parmCustomerAccount();

_FromDate = dataContract.parmFromDate();

_Todate= dataContract.parmToDate();

 

queryBuildDataSource = query.dataSourceTable(tablenum(SalesLine));

if (_CustAccount)

{

queryBuildRange = queryBuildDataSource.findRange(fieldnum(SalesLine, CustAccount));

if (!queryBuildRange)

{

queryBuildRange = queryBuildDataSource.addRange(fieldnum(SalesLine, CustAccount));

}

}

ShippingDateConfirmedFilter = SysQuery::findOrCreateRange(query.datasourceTable(tableNum(SalesLine)),fieldNum(SalesLine,ShippingDateConfirmed));

ShippingDateConfirmedFilter.value(SysQuery::range(_FromDate,_Todate));

 

queryRun = new QueryRun(query); ttsbegin;

while(queryRun.next())

{ _CustomerSaleTemp.clear();

querySalesLine = queryRun.get(tablenum(SalesLine));

_CustomerSaleTemp.SalesPrice =  querySalesLine.SalesPrice;

_CustomerSaleTemp.ItemId =  querySalesLine.ItemId;

_CustomerSaleTemp.ItemDescription =  querySalesLine.Name;

_CustomerSaleTemp.SalesQty =  querySalesLine.QtyOrdered;

_CustomerSaleTemp.CustAccount =  querySalesLine.CustAccount;

_CustomerSaleTemp.CustomerName = CustTable::find(querySalesLine.CustAccount).name();

_CustomerSaleTemp.insert();

 

 

 

 

}

ttscommit;

 

}

 

 

 

 

 

Now compile the class, generate Incremental CIL.

Step 4 create a reporting project

Now open Visual studio and create Model project say “CustomSalesLineReport”.

VisualStudio

From solution explorer, create a new report rename it RDPSalesLineReport

RDPSalesLineReport

 

 

Step 5 Bind a report to a report data provider class

 

Now double click on report and open it in

ExpandDataSet

 

 

Add new DataSet and rename it “DSSalesLine”. On right click and from property window set Data Source Type to “Report Data Provider”

 

RDPSettings

 

And click on Query and from browser window select The data provider class we created in previous step

CustomerSalesDataProvider

 

Click ok to create fields

FieldsDetails

 

Now drag and drop data set to Design node in report to create AutoDesign.  Rename it “RDPSalesLine”

 

Drag and drop

Expand “RDPSalesLine” design and drag and drop CustAccount field from Data Set to Group and sort nodes

SortAndGroup

 

Expand parameter of report and open the property of CustAccount parameter and set its allow blank to true and nullable to true, so if no customer is selected, report will run for all customer in legal entity

CustAccountSales

Save the report compile it, deploy it and add to AOT

 

Now switch back to AOT.  Create a new menu Item under Display node.

Mnu

 

And set menu item Name as “mnuRDPSaleLine” and set its properties as follow

MnuSettings

 

Save it and right click on menu item and open it

 

Report Dialog

 

Set values for From Date and To date and run the report, Report will work with business logic as follow

 

Sales

 

 

Query Based SSRS report from Scratch Dynamics Ax 2012 R3.

July 4, 2015 by alirazazaidi

In Microsoft Dynamics Ax 2012, we can create less complex reports with AOT Query or Static Query.

Simple or model based report is as follow.

QueryBased Report

http://dynamics-ax.blogspot.com/2011/12/ax-2012-ax-ssrs-report-design-concepts.html

 

The steps are as follow  We can create simple or model based report with following steps

  • Step 1: Create a Microsoft Dynamics AX query
  • Step 2: Create a new report in Visual Studio
  • Step 3: Apply Layout template
  • Step 4: Add Column sorting
  • Step 5: Group report data
  • Step 6: Filter report data
  • Step 7: Add a dynamic parameter
  • Step 8: Save and deploy the report
  • Step 9: View the report in Microsoft Dynamics AX

 

We can see these steps below

 

Now consider a scenario, where we have to display sales item detail with respect to its customer. As this report is not much complex and on exploring Dynamics Ax 2012 default tables we found that Sales order detail at Item level can be found on “SalesLine” table. Complexity is less so we decide to create this report with Static Query or AOT query based Report.

This Article is based on Contoso demo data, and Dynamics Ax 2012 R3 on demo licences

 

 

Open MS Dynamics Ax 2012 Client And press Ctrl+Shift+W to open dev environment or open the AOT.

When AOT open expand it and at AOT node add new query

CreatingAOTQuery

Rename Query to simple “QSalesLine”.

Expand its data Source Node, right click and add new data Source

Add DataSource

Rename the Data Source to SalesLine and select SalesLine table

SalesLineDataSource

Now expand the field Node and set its dynamic property to no

DynamicPropertyToNo

Right Click on Field and add new field and select salesId

 

SelectField

 

SalesId

Similarly you can add following fields

  • CustAccount
  • SalesId
  • OrderQty
  • SalePrice
  • LineAmount
  • ItemId,
  • Name,
  • CustGroup

QSales

 

Now save the Query.

 

Open Visual studio and create a new report project

ModelReport

 

 

Open Visual studio environment and create a new Report and Rename It to SalesLineReport

 

From solution Explorer add new report

SolutionExplorer

Now expand report and right click on data Source to create a new data source Rename It to DSSaleLine

SalesLineDS

 

Right click on “DSSaleLine” it Edit it or click on properties and open property window

propertyWindow

From Property window select

 

Click on Query and from Brower window select Required Query

 

Click on next window

SelectionOfQSales

 

Select all fields and click on save

FieldSelection

 

 

ReportDetails

 

Now drag the data set and drop on designs node, It will create auto Design

AutoDesign

Right click on report designer and do the following

Rename AutoDesign to as “SalesLineDesign”

Select ReportLayoutTemple to ReportLayoutTemplate

Title to “CustomSalesLineReport”

and click on save.

ReportTitle

Now expand “SalesLineDesign” design and drop and drop CustAccount in Group and Sort node. This will create the records group and line according to CustAccount

SalesLineReport

 

Now Compile the report, Deploy it and At to AOT.

 

 

Now open the AOT. Change the legal entity to “USMF” expand the menuItem node, and create a new display menu item

NewMenuItem

 

 

 

Change its Name to mnuCustomSalesLineReport

Change object Type to SSRS report and select the object is SalesLinereport and Report Design to SalesLineDesign

MenuSalesLine

 

 

Now save the menu and let’s run the report

ReportDailog

Click on ok to run the preview

Reports

Adding Dynamic Parameter

Create another query in AOT name it QCustomer, and add AccountNum is in field. You have to follow the same step which we used to create QSalesLine Query. Save the Query

DynamicQuery

Now switch back to model project in Visual studio and add new Dataset and Name it DSCustomer and pointed to QCustomer query the same way we select the Query.

DsCustomer

Now expand parameter node of report

And add new Parameter with Name “CustomerParm”

Expand Values and set

Customer

DynamicParameterparamet

Now expand Report designer and under filter node add new node

AccountFilter

Right Click on AccountFilter and from property window

Click on expression  To select = Fields!CustAccount

Operator select “Like”

And Value select =Parameters!CustomerParm.Value

FilterProperties

 

 

 

 

 

Save the report and deploy it, and then Add to AOT.

 

Open Aot and from item display menu to run report

 

You will found a new drop down for parameter in

CustomerSelection

 

 

Form this parameter You can select and run the report for specific customer

CustomerSelectionReport

Material from Microsoft Dynamics Ax Technical conference 2015

February 25, 2015 by alirazazaidi

Material from Microsoft Dynamics Technical Conference 2015 is available for download.

This material contains,

  • Training manuals.
  • PDF,
  • Videos
  • Power point presentations
  • Hand on lab material.

https://mbs.microsoft.com/customersource/northamerica/AX/learning/presentations/AXTechConf15PresentationVideos

 

For visiting this linking you must have partner source or customer source credentials.

 

Exploring proxy classes in Dynamics Ax 2012 R3

November 15, 2014 by alirazazaidi

 

In C# or vb.net we can connect and perform on Dynamics Ax classes and Tables with business connector.

logoThis technique is widely used in Dynamics Ax 2009 and rarely I saw these used in ax 2012. Its depends on

Requirement.

Consider following scenario where  I have to perform different operations on following custom table.

custom table structure

Create a New console application in C#

For this propose you have to add the reference of dll “Microsoft.Dynamics.BusinessConnectorNet.dll”

 

Usually you can find it following location.

C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\

 

Proxy

 

 

 

Now following code will help perform different operation on Dynamics Ax Table through proxy classes.

 

Create

 

try

{

Axapta ax;

AxaptaRecord _recoder;

ax = new Axapta();

ax.Logon("Usmf", null, null, null);

 

_recoder = ax.CreateAxaptaRecord("StudentInfoTable");

_recoder.set_Field("Address", "Lahore");

_recoder.set_Field("DateOfBirth", new DateTime(1979, 4, 9));

_recoder.set_Field("FirstName", "Ali ");

_recoder.set_Field("LastName", "Zaidi");

_recoder.Insert();

 

}

catch (Exception ex)

{

Console.WriteLine(ex.Message);

 

}

 

 

Read all  

try

{

Axapta ax;

AxaptaRecord _recoder;

ax = new Axapta();

ax.Logon("Usmf", null, null, null);

 

_recoder = ax.CreateAxaptaRecord("StudentInfoTable");

_recoder.ExecuteStmt("Select * from %1");

 

while (_recoder.Found)

{

 

Console.WriteLine("FirstName " +_recoder.get_Field("FirstName"));

Console.WriteLine("LastName " + _recoder.get_Field("LastName"));

 

_recoder.Next();

}

 

Console.ReadKey();

 

 

 

}

catch (Exception ex)

{

Console.WriteLine(ex.Message);

 

}

 

 

Read specific

 

 

try

{

Axapta ax;

AxaptaRecord _recoder;

ax = new Axapta();

ax.Logon("Usmf", null, null, null);

 

_recoder = ax.CreateAxaptaRecord("StudentInfoTable");

_recoder.ExecuteStmt("Select * from %1 where %1.FirstName=='Ali'");

 

while (_recoder.Found)

{

 

Console.WriteLine("FirstName " +_recoder.get_Field("FirstName"));

Console.WriteLine("LastName " + _recoder.get_Field("LastName"));

 

_recoder.Next();

}

 

Console.ReadKey();

 

 

 

}

catch (Exception ex)

{

Console.WriteLine(ex.Message);

 

}

11-15-2014 6-38-17 AM

Update

try

{

Axapta ax;

AxaptaRecord _recoder;

ax = new Axapta();

ax.Logon("Usmf", null, null, null);

 

_recoder = ax.CreateAxaptaRecord("StudentInfoTable");

_recoder.ExecuteStmt("Select forupdate * from %1 where %1.FirstName=='Ali'");

 

while (_recoder.Found)

{

 

Console.WriteLine("FirstName " +_recoder.get_Field("FirstName"));

Console.WriteLine("LastName " + _recoder.get_Field("LastName"));

ax.TTSBegin();

_recoder.set_Field("LastName", " Raza  Zaidi");

_recoder.Update();

ax.TTSCommit();

_recoder.Next();

}

 

Console.ReadKey();

 

 

 

}

catch (Exception ex)

{

Console.WriteLine(ex.Message);

 

}

 

Delete

nbsp;

 

Axapta ax;

AxaptaRecord _recoder;

ax = new Axapta();

ax.Logon("Usmf", null, null, null);

 

_recoder = ax.CreateAxaptaRecord("StudentInfoTable");

_recoder.ExecuteStmt("Select forupdate * from %1 where %1.FirstName=='Ali'");

 

while (_recoder.Found)

{

 

Console.WriteLine("FirstName " +_recoder.get_Field("FirstName"));

Console.WriteLine("LastName " + _recoder.get_Field("LastName"));

ax.TTSBegin();

_recoder.set_Field("LastName", " Raza  Zaidi");

_recoder.Delete();

ax.TTSCommit();

_recoder.Next();

}

 

Console.ReadKey();

 

 

 

}

catch (Exception ex)

{

Console.WriteLine(ex.Message);

 

}

Exploring the Batch Job process in Dynamics Ax 2012 R3

November 13, 2014 by alirazazaidi

 

There are many scenario where we have to schedule the tasks, so they execute in background. Real world scenarios are

  • Sales order with certain criteria will update status to Invoiced.
  • Scheduled job check the file location to find comma delimited files and after finding create sales order or purchased orders in Ax.
  • Schedule job clear the data in database logging after certain time.
  • Schedule job execute mid night to extract all sales order/ Purchase order and integrated it other system.

 

In dynamics Ax we can schedule the with help of RunBaseBatch framework.

 

For current example, I just wrote the batch job which just put its execution time in custom table.

First step for batch process is to enable the Dynamics Ax 2012 as Batch server.

Link

 

 

Enable Server

Consider a custom table with only two fields. These fields just dummy text and the time when batch process execute.

 

Table Structure

 

Now just create a class, set it run at server.

 

Class attributes

Extends the class with run batch base class.  The class logic should be same

 

 

class ProcessTableIncrement extends RunBaseBatch

{

 

}

 

public container pack()

{

return conNull();

}

 

public void run()

{

 

// The purpose of your job.

TblBatchHit _hit;

 

_hit.HitBy ="BatchJob";

_hit.hitTime= DateTimeUtil ::utcNow();

_hit.insert();

}

 

public boolean unpack(container packedClass)

{

return true;

}

 

Now compile the code and Generate Increment CIL. Incremental CIL generation is required to setup every time you update the code.

 

Now create ax job which deploy above class as batch Process job.

 

static void TestBatchHit(Args _args)

{

BatchHeader header;

SysRecurrenceData sysRecurrenceData;

Batch batch;

BatchJob batchJob;

ProcessTableIncrement _ProcessIncrement;

BatchInfo processBatchInfo;

BatchRetries noOfRetriesOnFailure = 4;

;

 

// Create the tutorial_RunBaseBatch job, only if one does not exist

select batch where batch.ClassNumber == classnum(ProcessTableIncrement);

if(!batch)

{

// Setup the tutorial_RunBaseBatch Job

header = BatchHeader::construct();

_ProcessIncrement = new ProcessTableIncrement();

processBatchInfo = _ProcessIncrement.batchInfo();

processBatchInfo.parmRetriesOnFailure(noOfRetriesOnFailure);

processBatchInfo.parmCaption("Table Increment");

 

header.addTask(_ProcessIncrement);

 

// Set the recurrence data

sysRecurrenceData = SysRecurrence::defaultRecurrence();

SysRecurrence::setRecurrenceStartDateTime(sysRecurrenceData, DateTimeUtil::addSeconds(DateTimeUtil::utcNow(), 20));

SysRecurrence::setRecurrenceNoEnd(sysRecurrenceData);

SysRecurrence::setRecurrenceUnit(sysRecurrenceData, SysRecurrenceUnit::Minute);

header.parmRecurrenceData(sysRecurrenceData);

// Set the batch alert configurations

header.parmAlerts(NoYes::No, NoYes::Yes, NoYes::No, NoYes::Yes, NoYes::Yes);

header.save();

 

// Update the frequency to run the job to every two minutes

ttsbegin;

select forupdate batchJob

join batch

where batchJob.RecId == batch.BatchJobId

&& batch.ClassNumber == classnum(ProcessTableIncrement);

 

sysRecurrenceData = batchJob.RecurrenceData;

sysRecurrenceData = conpoke(sysRecurrenceData, 8, [3]);

batchJob.RecurrenceData = sysRecurrenceData;

batchJob.update();

ttscommit;

}

}

 

 

When you execute the X++ job, you will find a new batch job created and waiting state at following link with caption Table Increment

 

Job Link

 

 

From top menu you can check the job execution history.

 

Batch Job

 

Job History

 

If any error occur or you put some info logs, these can be seen from Log from top menu.

For example in some other batch job I used many info boxes at different locations to trace.

11-12-2014 12-58-09 AM

 

Remove / Delete the batched job.

Delete the existing job is two-step process if job is in waiting step. First we have to convert it into withhold state and then delete it.

Select the required batch job for example if I want to delete Job with caption “Table Increment”. From top menu to select change state to with hold

 

select

 

withhold

 

Now again go in Functions top menu and select

 

delete

Now from dialog set status to withhold and click on ok

ddd

This will remove the Batch Job

 

Debug the Batch Process Job

Now question is how we can debug batch job, for that purpose we have to go in visual studio.

 

For debugging at AOS server following check box must be check form AOS server configuration.

“Enable breakpoints to debug x++ code running on this server on this machine”

X++

 

 

 

If Client and AOT are in same machine then open the Application explore and locate the file and attach debug there.

Visual studio debug

 

 

If files are at AOS is another machine go at XPPIL folder in visual studio and add break point.

 

 

 

From debug menu click on attached process

Attached process

From  Attach to select the manage code.

From top click on select button and select the Managed(v4.0) code

ttss

Check the two check boxes below “Show Processes from All Users and show processes in all sessions and click on refresh.

After refresh select Ax32Serv.exe and click on attach button.

 

When the job execute after certain time link appear on break point.

sss

« 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