Skip to main content

Posts

Showing posts with the label refresh

AXAPTA refreshing records

repairjournal_ds.research(); repairjournal_ds.refresh(); If you want to stay at current record: repairjournal_ds.research(true); repairjournal_ds.refresh();

How to refresh a parent form while updating the child form in axapta 2009?

After Writing or Deleting the record from the child form you just mention these lines... write() { .... .... ParentTable_ds.reread(); element.args().record().reread(); } or PurchLine_ds.executeQuery(); or Analyse the code below <> void clicked ( ) { PurchLine tmpPurchLine; PurchLine updatePurchLine; PurchLine selectedRecord; Dialog dl; DialogField dlfTransdate; ; dl = new Dialog ( "Change confirmed date" ) ; dlfTransdate = dl. addFieldValue ( typeid ( "Transdate" ) , today ( ) , "Confirmed date" ) ; if ( dl. run ( ) ) { selectedRecord = PurchLine_ds. cursor ( ) ; for ( tmpPurchLine = PurchLine_ds. getFirst ( true ) ? PurchLine_ds. getFirst ( true ) : PurchLine_ds. cursor ( ) ; tmpPurchLine; tmpPurchLine = PurchLine_ds. getnext ( ) ) { ttsbegin ; SELECT FORUPDATE updatePurchLine WHERE updatePurchLine. PurchId == tmpPurc...

Tutorial: refresh, reread, research, executeQuery - which one to use?

X++ developers seem to be having a lot of trouble with these 4 datasource methods, no matter how senior they are in AX. So I decided to make a small hands-on tutorial, demonstrating the common usage scenario for each of the methods. I have ordered the methods based on the impact on the rows being displayed in the grid. You can download the xpo with the tutorial on my SkyDrive. 1. Common mistakes Often, developers call 2 of the mentioned methods in the following order: formDataSource.refresh() formDataSource.research() or formDataSource.reread() formDataSource.research() or formDataSource.research() formDataSource.executeQuery() or formDataSource.research() formDataSource.refresh() / formDataSource.reread() All of these are wrong, or at least partially redundant. Hopefully, after reading the full post, there will be no questions as to why they are wrong. Leave a comment to this post if one of them is still unclear, and I will try to explain in more detail. 2. Refresh This method basical...