Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Monday, April 3, 2023

Iterate form Datasource in AX2012 /D365 FO

 Hi,

I used the event hander onClicked button to select all the records of lines in datasources 

   public static void Demo_DeleteButton_OnClicked(FormControl sender, FormControlEventArgs e)
    {
        FormButtonControl  callerButton = sender as FormButtonControl;
        FormRun form = callerButton.formRun();
        FormDataSource forecastSales_ds =  form.dataSource(formdatasourcestr(Demo, ForecastSales))  as FormDataSource;
        ForecastSales forecastSalesExpand;
        ttsBegin;
        for(forecastSalesExpand = forecastSales_ds.getFirst(true) ? forecastSales_ds.getFirst(true) : forecastSales_ds.cursor();
forecastSalesExpand; 
forecastSalesExpand = forecastSales_ds.getNext())
        {
            //Perform your operation in forecastSalesExpand;
        }
        forecastSales_ds.executeQuery();
        ttsCommit;
    }

Regards,

Thursday, December 29, 2022

Adding filter to tablix using in """ XYZ""","""LMN""" in SSRS

 Hello,


When we add ranges values to tablix filters will auto updates the values to """.


This can be fixed by 

=CStr("03. Lines,04. Lines Total").Split(",")


Regards,

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...