Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

I am trying to populate a form grid with a temprory table which is set as form's datasource

$
0
0

I have a requirement such that i have a form which contains PO id as a listbox.

In action pane i have a find button.

Below the field there is a grid which is populated by a temprory table(filtered according to PO)

the requirement is such that when i select a PO number and click on find button the corresponding lines should be populated in the grid.

Issue:  when i set table as regualr data is populated correctly but as temprory table it disappears.

code: 

in clicked method of find 

void clicked()
{

//Need to pass the parameter here to fetch the data in a grid
ABC_TMPPurchtData.setTmpData(element.fetchData(dialogPONumber.text()));

ABC_TMPPurchtData_ds.executeQuery();
}

fetch data method 

public CBO_TMPPurchtData fetchData(purchId _PurchId)
{

PurchTable purchTable;
PurchLine purchLine;

while select purchTable
Join purchLine where purchTable.PurchId==purchLine.PurchId
&& purchTable.PurchId==_PurchId

{
tMPPurchtData.PurchId=purchTable.PurchId;
tMPPurchtData.LineNumber=purchLine.LineNumber;
tMPPurchtData.ItemId=purchLine.ItemId;
tMPPurchtData.OrderAccount=purchTable.OrderAccount;
tMPPurchtData.insert();

}

return tMPPurchtData;

}


Viewing all articles
Browse latest Browse all 72043

Trending Articles