Moving 'Item number', 'Delivery date', 'Confirmed' fields to main Overview grid

Dear Sir/Madam

I’m rather new to developing in Dynamics AX.

I’m working in Dynamics AX 2009. I have a project to display the number of days a vendor is late in supplying goods. The PurchTable form contains most of the fields I require. Therefore, I have created my required form by duplicating the PurchTable form.

I need to move the StringEdit control ‘PurchLine_ItemId’ located on the PurchTable’s form in [Group:Line], [Tab:TabLine], [TabPage:TabLineOverview], [Grid:LineSpec] (the 2nd gridview) to the main TabHeaderOverview grid at the top of the form.

I also want to move the ‘Delivery date’, and ‘Confirmed’ date fields from the form’s ‘DeliveryGroup’ to the top-most Overview grid as well.

However, when I move the ‘PurchLine_ItemId’ field, which appears with the name “Item number” into the Overview grid, it no longer is populated with the item number. I’m fairly certain the same thing will happen when I attempt to move the 2-date fields.

Can someone please suggest what steps I need to take so that the ‘PurchLine_ItemId’ field populates as it does in the PurchTable’s form in [Grid:LineSpec]?

Do I need to write a display method, or why does the ItemId field suddenly stop populating. Any suggestions for this control as well as moving the 2-date controls, would be much appreciated. Thank you in advance.

First question, what happens when you have diferent lines with different delivery dates each? Second question: Why do you need to move the itemId fields?, this field belongs to the line and not to the header.

Hi,

Don’t duplicate PurchTable form. You may end up unnecessarily complicating your requirement.

Just create a simple form with details such as vendor account, PO no, item number, delivery date etc. Look under Accounts Payable > Inquiries for inspiration.

Hello Harish, before I duplicated the PurchTable form I did create a simple form containing the following fields: ‘Vendor account’, ‘Vendor Name’, ‘Purchase order’, ‘Item number’, ‘Total Price of Quantity Received’, ‘Delivery date’, ‘Confirmed date’, ‘Received Date’ and I will need to add one more field to display the number of

“Days Late”, which will reflect the difference between InventTrans.DatePhysical - PurchLine.DeliveryDate. The field ‘Total Price of Qty Received’ is a DataMethod, where I attempt to acquire the ‘Qty’ from InventTrans where InventTrans.ItemId equals PurchLine.ItemId and InventTrans.TransType equals the enum of “3”. Then I pass this quantity to PurchLine.calcLineAmount like the following code snippet:

Display AmountCur total_Price_Qty(PurchLine _purchLine)
{
real qty;
;

select Qty from InventTrans where InventTrans.ItemId == _purchLine.ItemId && InventTrans.TransType == 3;

if (InventTrans.RecId)
{
qty = Qty;
}

return _purchLine.calcLineAmount(qty);
}

I would be satisfied using my created form if I knew how & which tables to query in order to populate these fields like the PurchTable form has them populated.

How can I determine which tables to query? Are there existing queries in the AOT which the PurchTable form utilizes to populate its fields?

Thanks in advance for your suggestions.