Posts

Showing posts from December, 2023

Get Person Name in D365fo X++

 Get Person Name & Department in D365fo X++

On Modified Event Handler in D365fo X++

On Modified Event Handler in D365fo X++

How to Generate email Alert from IGP in D365fo in x++

 How to Generate email Alert from IGP in D365fo in x++ public static boolean sendEmail(TxlGatePassID  IGPID)     {         TxlGatePassLine     txlGatePassLine;         TxlGatePassHeader   txlGatePassHeader;         PurchTable          purchTable;         PurchLine           purchLine;         TxlGatePassTmp      txlGatePassTmp;         PurchReqLine        purchReqLine;         SLD_IGPEmailTmp     sLD_IGPEmailTmp,sLD_IGPEmailTmpGroup,sLD_IGPEmailTmpEmil;         PurchReqTable       purchReqTable;         int                 countSo;         ;         while sele...

On Leaving Event Handler in D365fo X++

 On Leaving Event Handler in D365fo X++ /// <summary>     ///     /// </summary>     /// <param name="sender"></param>     /// <param name="e"></param>     [FormControlEventHandler(formControlStr(EntAssetWorkOrderJournal, ProjJournalTransHour_Qty), FormControlEventType::Leaving)]     public static void ProjJournalTransHour_Qty_OnLeaving(FormControl sender, FormControlEventArgs e)     {         try         {             FormDataSource      ProjJournalTrans_ds     = sender.formRun().dataSource(formDataSourceStr(EntAssetWorkOrderJournal, ProjJournalTransHour));             ProjJournalTrans    ProjJournalTrans        = ProjJournalTrans_ds.cursor();             FormRealControl HoursVal  ...

D365FO – AX – X++ –Refresh, Reread, Research, and ExecuteQuery

 D365FO – AX – X++ – Tutorial: Choosing Between Refresh, Reread, Research, and ExecuteQuery X++ developers often face challenges with the four datasource methods—refresh, reread, research, and executeQuery—in Dynamics 365 Finance and Operations (D365FO). Regardless of their seniority in AX, developers frequently make mistakes in the sequence of calling these methods. To address this, I've created a brief hands-on tutorial illustrating the typical use cases for each method. I've organized the methods based on their impact on the displayed grid rows. 1. Common Mistakes: Developers often incorrectly call two of these methods in the following order: - formDataSource.refresh() followed by formDataSource.research(), or - formDataSource.reread() followed by formDataSource.research(), or - formDataSource.research() followed by formDataSource.executeQuery(), or - formDataSource.research() followed by formDataSource.refresh() / formDataSource.reread(). These sequences are either entirely...