Wednesday, September 13, 2017

Models and Model store in ax 2012

Model and Model store : 


>> The earlier release of Microsoft Dynamics AX stores the metadata in the application files which is AOD files.

>> In AX 2012 all the file based AOD files are replaced by SQL Server database based, which are called by Model Store.


Models and Model Files : 


>> Models are logical group of element like tables and classes.   In AX 2012 elements can be group and store in the model file.
>> Model files are easy to create, export, import and this can be uninstalled from the system when not required.
>> Each layer consists of one or more models. Each layer contains one system-generated model that is specific to that layer.
>> Every element in a layer belongs to only one model. In other words, no element can belong to two models in the same layer, and every element must belong to a model.
>> A default model owned by Microsoft exists in each layer. Default models cannot be modified.
>> A model is permanently associated with the layer that the model was created in.
>> If you need to move one of your models from one layer to another, you must create a project from the model in the Application Object Tree (AOT), export the project as an xpo file, create a target model in the desired layer, delete the original model to avoid having to resolve layer conflicts, and import the xpo file to the target model. If you are moving elements between models in the same layer, you can use the Move to model command in the AOT.

>> Models are stored in the model store. The model store is a database in which all application elements for Microsoft Dynamics AX are stored.
>> Customizations are also stored in the model store.
>> The model store replaces the Application Object Data (AOD) files that were used in earlier versions of Microsoft Dynamics AX.
>> Models that have been installed in the model store are used at run time.

>> In Microsoft Dynamics AX 2012 R2, the model store was moved into a database that is separate from the business database.

>> Models were introduced in Microsoft Dynamics AX 2012 to help partners and customers more easily install and maintain multiple solutions side by side in the same layer.

Hope this info. proves to be helpful to you... :)

Thursday, September 7, 2017

How to Display Header information in SSRS Report

In my one of project I required like below information in header Fromdate, Todate, Report run date and Page no out of total pages.

Copy paste below code and change your fields and Changes in Textbox Properties like HTML formatting.
For that Select your Textbox inside Expression and right click on it and go to Textbox property ON General Tab There are to Radio button one for Text and another for HTML Content Select HTML text. After that run your report and you will get.

="From Date : " & Format(Fields!FromDate.Value, "dd/MM/yyyy") & "<br>" &
"To Date : " & Format(Fields!ToDate.Value, "dd/MM/yyyy") & "<br>" &
"Report Run Date : " & FORMAT(Now(),"dd/MM/yyyy hh:mm:ss tt") & "<br>" &
"Page "&Globals!PageNumber &" of "&Globals!TotalPages

Friday, September 1, 2017

List of Tables and type of data they stored in AX 2012

The order processing systems consist of a set tables that control order entry and base information pertaining to an installation. For example you must have customer to enter sales orders against, how else would a company generate revenue. You must have vendors to generate purchase orders, etc. Below I have detailed the tables that are used to perform daily transactions that keep a business running.
CustTrans -The CustTrans table contains posted transaction information for the customer. 
VendTrans -The VendTrans table contains posted transaction information for the vendor. 
CustSettlement– The CustSettlement table contains information relating to the settlement or reverse settlement of two transactions. They are used to link a transaction with the transaction it was settled against.
VendSettlement– The VendSettlement table contains information relating to the settlement or reverse settlement of two transactions. They are used to link a transaction with the transaction it was settled against.
CustGroup – The CustGroup table contains a list of groups into which customers can be added. Every customer must specify a CustGroup with which it is associated.
VendGroup – The VendGroup table contains definitions of vendor groups.
CustTable – The CustTable table contains the list of customers for accounts receivable and customer relationship management.
VendTable – The VendTable table contains vendors for accounts payable.
SalesTable – The SalesTable table contains all sales order headers,
regardless of whether they have been posted or not.
PurchTable – The PurchTable table contains all purchase order headers, regardless of whether they have been posted or not.
SalesLine – The SalesLine table contains all sales order lines, regardless of whether they have been posted or not.
PurchLine – The PurchLine table contains all purchase order lines,
regardless of whether they have been posted or not.
LedgerTable – The LedgerTable contains the definitions of the general
ledger accounts, also called the chart of accounts.
LedgerTrans – The LedgerTrans table contains the posted general ledger
transactions.
LedgerAccountCategory – The LedgerAccountCategory contains the financial categories that accounts fall into. The categories are assigned to accounts to allow easier grouping of accounts on financial statements.
Dimensions – The Dimensions table contains the dimension values for all of the defined dimensions. This is explained further later on.
LedgerTableInterval – The LedgerTableInterval table contains ranges of accounts associated with a Total ledger account.
LedgerBalancesTrans – The LedgerBalancesTrans table contains the posted ledger amounts per account and date.
LedgerBalancesDimTrans – The LedgerBalancesTrans table contains the posted ledger.
Thanks & Happy DaXing………

How to Debug batch jobs and service operations in Dynamics AX 2012

All batch jobs and service operations now run in managed code (IL) and require different 
debugging steps.  Rather than setting breakpoints within X++, you need to set them within
the IL code that corresponds to the X++ code and debug in Visual Studio.
1) Open Visual Studio as 'administrator' and attach the debugger to the Ax32Serv.exe process.
2) Note that it may also be necessary to change the ‘Attach to’ selection to
‘Managed (v4.0) code’ and make sure “just my code” is unchecked in 
VS: tools->options->debugging->General
3) Once done, open up the file you want to debug in Visual Studio. 
All of the X++ code is compiled into IL and can be found in the 
following directory after deployment: 
..\Program Files\Microsoft Dynamics Ax\6.0\Server\AxaptaDev\Bin\XppIL\source\
4) Set a breakpoint in the file you opened.
5) Go to Ax and run the process in batch mode, or execute the service operation.
 This will end up hitting your breakpoint, provided you set it in the right place.


If you make some changes to X++ code and want those changes reflected in the 
generated IL code, you need to do the following AFTER you have compiled the X++ code.
Once done, your changes will be reflected in your next debugging session:

Source:

D365 Extensions: Extend the validateField Method on a Table

In this post I will going to show you, how to extend the validateField method on a table. As example I used the SalesLine, where I will ...