Sunday, 28 September 2014

Models and Model Files in AX 2012 R2

SQL Server-based 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.
Models can manage through following tools.
  1. AXUtil.exe command-line utility.
  2. Programmatically; using axutilib.dll
  3. PowerShell.
Creating Model
Step 1: Click Start ->Click Run ->type “cmd” and Press End; you will get command prompt screen.
Step 2 : Type following command in command prompt.
“c:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin”
Basically we are changing current directory to AOS Server folder.  The above path will change depends upon your current installation.
Step 3: Type following command in command prompt.
         AxUtil.exe create /model:CustCustomer /layer:USR
 Basically using AxUtil we are creating model name call “CustCustomer” in USR Layer
After successful creation of model file; you will see below out in command prompt.

Changing Current Model in AX
 Step 4: Click on Current Model in the status bar; system will display all the model available in current layer.
List of model available in Current Layer
Step 5:  Select “Cust Customer” model and click ok.
(System will change current model in the status bar; refer below screen shot)
Creating/Changing Object in current Model
Step 6:  Create Table called “ModelExample” and Save the table.
Step 7: Right click on “ModelExample” Table and select Properties.  In the properties you can notice that newly created object belongs to “CustCustomer” model
Exporting Model
Step 8: Type following command in command prompt.
AxUtil.exe export /file:c:\CustCustomerModel.axmodel /model:CustCustomer
You will see following output message in the screen.
Confirm Model files exported correctly by verifying physical folder
Uninstalling Model
Step 9: Type following command in command prompt.
              AxUtil.exe delete /model:CustCustomer
You will see following output message in the screen
Check Object Model in AX, You will not see the CustCustomer Model in Model List window.  All the object belongs to this model will be deleted from AOT.

Sunday, 21 September 2014

Purchase Order Flow in AX 2012 R2

Step 1 :  Account Payable->Common->Purchase Orders ->All Purchase Orders
Step 2 :  Click Purchase Order Icon.
Step 3: Enter necessary information in purchase order header screen.
Step 4: Enter Purchase order line information.
Confirming Purchase Order
Step 5 : Select Purchase Menu on Top
Step 6 : Click on Purchase (Confirming PO with regular popup screen) or Confirm (Confirming PO without popup screen) Button
Receiving Purchase Order (Packing Slip/ Product Receive)
Step 7 : Select Receive Menu on Top
Step 8 : Select Product receipt (Packing Slip)
Step 9 : Enter Packing Slip Information such as Packingslip Number and Qty.
Step 10 : Post Product Receipt
Check Purchase Order Status
Invoicing Purchase Order
Step 11 :  Select Invoice Menu on Top
Step 12 :  Click Invoice Button (Left)
Step 13 : Enter Invoice Information (Number & Invoice Description) on the screen.
Step 13:  Select Post Option on the Top
Check the Purchase Order Status

Monday, 8 September 2014

AX2012 AXUTIL commands to Import,Export,Delete Models

// creating the Model in the Layer

AxUtil create /model:"TestModel" /Layer:CUS

// exporting the model to file
AxUtil export /model:"TestModel" /file:TestModel.axmodel

// importing the model from file
AxUtil import /file:TestModel.axmodel

// delete the model
AxUtil delete /model:"TestModel"

//delete the layer
AxUtil delete /layer:ISV

// if you have multiple instances running
//delete the layer from the database and AXserver.
Axutil delete /layer:ISV /db:<database> /s:<server>