Purpose: The purpose of this document is to illustrate how we can create and post product receipts of purchase orders in X++. Business requirement: Ability to post product receipts of purchase order automatically. As of now Standard AX offers manual product receipt posting by clicking Procurement and sourcing > Periodic > Purchase orders > Product... Continue Reading →
AX 2012: Create SSRS Column Chart Report
Purpose: The purpose of this document is to demonstrate how to develop SSRS column chart report in Dynamics AX 2012. Prerequisites: Visual Studio 2010 Visual Studio tools. Reporting extension. Report Builder. Should be well-versed in Report Programming Model. Business Requirement: Create a column chart report to show top products sold in the year 2012. Project... Continue Reading →
AX 2012: Mastering Batch Framework
Master the Batch Framework in Dynamics AX 2012 by going through the following topics in sequence. The initial topics discuss the basics followed by advanced and complex concepts of the Batch Framework. All the posts will be based on the SysOperation framework which is recommended over the depreciated RunBase framework to develop customized batch jobs. Following are... Continue Reading →
AX 2012: Customize Controller for Batch Job
The purpose of this document is to demonstrate what power we can leverage by customizing the controller for our batch job. For simplicity, we'll explore how we can set batch dialog fields with default values by extending SysOperationServiceController class. Prerequisites: It is highly recommended to go through the following posts to get a better understanding... Continue Reading →
AX 2012: Add Lookup to Batch Job Dialog
Prerequisites: 1. Create a simple batch job. 2. Add fields to batch job dialog. Business Requirement: To have a lookup on the batch job dialog to filter records to be processed based on the user selected value of sales channel field on the dialog. Project Overview: We'll be adding a new UI Builder class MAKSalesTableUIBuilder and... Continue Reading →
AX 2012: Add Fields to Batch Job Dialog
Prerequisites: 1. Create a simple batch job. Requirement: To add custom fields to batch job dialog to choose a date range to process only those records falling in that date range. Project overview: As you can see in the picture, a data contract class MAKSalesTableContract has been added to the project to achieve the goal.... Continue Reading →
AX 2012: Create a Simple Batch Job
In this post we'll learn how to create a very basic custom Batch job using SysOperation framework. We'll use the base controller class SysOperationServiceController and develop a custom service operation class to achieve the goal. Requirement: To create a Batch job to mark all the records as processed in a custom table MAKSalesTable. Project overview: The... Continue Reading →
AX 2012: Off-The-Shelf Excel Reader
Download it, adapt it, run it! Please find above the project XPO of the Off-the-shelf Excel reader. To adapt and run it for your Excel file format: Update macros in the class declaration to match your Excel file columns. Update readExcelFile() method to use your table buffer to persist records in. Click Menu Items... Continue Reading →
AX 2012: Setting Labels in X++
To set Label property of all the fields of a table in AOT, you may refer to the following code which loops through all the fields of a table and sets their Label property with their Name property. static void MAKSetLabels(Args _args) { #Properties SysDictTable dictTable = new SysDictTable(tableNum(CustTable)); SysDictField dictField; TreeNode treeNode; FieldId fieldId... Continue Reading →
AX 2012: Sales Order Posting Custom Validations
It is often a customer requirement to check for custom validations before posting a Sales Order. The best place to put your code for custom validations can be found below: Validations for Sales Table: AOT > Classes > SalesFormLetterProvider > checkHeading() For example, To check for custom field SalesTable.MAKBlocked, this is how custom validation should be added in... Continue Reading →