Skip to main content

Posts

Showing posts from March, 2016

AX 2012 : Generate customer account statement as PDF through X++

Customer account statement in AX 2012 R3 can be generated from Accounts Receivable > Reports > External > Customer account statement. However, if we need to generate this report through code - how can we achieve this? I created a new query in AOT with only dataSource 'CustTable', as I want to loop on selected customers only. I created a class extending from RunBase (did not want to touch existing report and class for customer account statement) being considering it a custom process of generating customer account statement using X++ code opposed to what exists in system. New query looks like this with three ranges, these ranges will show on dialog form Created a new class with following methods which are common for every dialog class; main construct new pack unpack dialog getFromDialog run showQueryValues queryRun I will explain important methods from the class which I think need discussion. QueryRun method - this method ...

AX 2012 - sysOperation Framework implementation [Example]

This post demonstrates how to create batch classes using Business Operation Framework (or sysOperation). We used to use RunBaseBatch framework to implement batch functionality before this new concept of AX services was taken in place. Compensations of BOF (or sysOperation) framework over RunBaseBatch are very well explained here  http://daxmusings.codecrib.com/2011/08/from-runbase-to-sysoperation-business.html .  Key points RunBase/RunBaseBatch Vs sysOperation Frameworks The sysOperation framework is an implementation of the MVC pattern  (Model-View-Controller) Model - parameters [contract class] View - Dialog [contract class or an optional UI builder class] Controller - Process (the code that runs in the essence of pattern) The framework influence the Services framework, whereas a service in AX has a data contract with some special attributes DataMember attributes in contract class take the entered values in parameters (dialog fields) to ...