January 09, 2015

How to add new fields/Methods in Listpage from in AX 2012

How to add new fields/Methods in List page from in AX 2012
Here we use the Production Order list page for example
Open Production order list page from below link
Production control/Common/Production orders/All production orders
clip_image002
Now we need to add one new field “Serial Number” in this grid (Assuming there will be only one item in one Production order in every case).
This serial number is available in “Transaction” from of this production order.
Untitled
Now to display new fields you can add a new display method in table and drag-drop this method in a grid as a field.
Add one new method in “ProdTable” table add copy below code
display InventSerialId inventTransInventSerialId()
{
InventTransOrigin InventTransOrigin;
InventTrans InventTrans;
;
select InventTrans join InventTransOrigin
where InventTrans.InventTransOrigin == InventTransOrigin.RecId &&
InventTrans.ItemId == InventTransOrigin.ItemId &&
InventTransOrigin.ReferenceId == this.ProdId &&
InventTransOrigin.ItemId == this.ItemId;
return InventDim::find(InventTrans.inventDimId).inventSerialId;
}
Now set DataSource property of this new field as ProdTable. Save your from and compile for any error.
Now open this from, here is your from
clip_image008

-Harry

December 23, 2014

How to Attachments button on a new form DAX 2012 R3

Hi Friends,

Here is another post to share with you all.
In this post will will demonstrate how to add a button for document handling on a new AX Form. To add this functionality you may need to perform following steps.

Step 1. Open your form in AOT and Go to from Design node.

Step 2. Add new button group under ActivePanTab.

Step 3. Add new command button under this new button group.

clip_image001

Step 4. Set following properties of this button

clip_image002

Now you need to do one functional setup for this new customization

Step 5: Open below from
 Organization administration/SetUp-> Document Management -> Active Document Table

Step 6: Add your table details here and click on Always enable.

clip_image003

Step 7: So its done now.
Open your form and click on Attachment button , below form must open.

clip_image006
Enjoy……
Merry Christmas to all of you.

-Harry