Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 64797

How to create Info part and use it on List page

$
0
0
This post is about how to create info Part in AX and use it on list page.

For this example; I am using Projects List page and will add Revenue Info Part on it.

Right click on AOT\Parts\Info Parts and create New Info Part


















Assign Query to this info part I have assigned ProjTable_NoFilter query
















Add New Group under Layout
























Name it ProjectRevenue and set few properties as shown













Note I haven't assigned DataSource to this group, I will be using data methods to get data here.

Add new fields under ProjectRevenue group and name it RevenueAtSales and RevenueAtOrders












I assigned ForecastRevenueAtSalesSw data method to field RevenueAtSales, this data method is written on at \Data Dictionary\Tables\ProjTable\Methods\forecastRevenueAtSalesSw

private AmountCur forecastRevenueSw()
{
    ProjForecastOnAcc projForecastOnAcc;
    real total;

    // Sum all the prices with quantity of 1.
    selectsum(SalesPrice) from projForecastOnAcc
        where projForecastOnAcc.ProjId == this.ProjId
           && projForecastOnAcc.Qty == 1;

    total = projForecastOnAcc.salesPrice;

    // Support non-unity quantities.
    whileselectSalesPrice, qty fromprojForecastOnAcc
        where projForecastOnAcc.ProjId == this.ProjId
           && projForecastOnAcc.Qty != 1
    {
        total += (projForecastOnAcc.salesPrice * projForecastOnAcc.qty);
    }

    return total;
}

Add this Info part to ProjProjectsListPage as I want to see this on Project List page.

Right click on Parts node in ProjProjectsListPage























Name it FF_ProjectRevenue



















Set IsLinked Property to YES, this property will link this part to the list page based on Datasource (ProjTable)















Create new display menu item and name it FF_ProjectRevenueMenuitem












Assign this menu item as Part property in ProjProjectListPage
















Time to see this info Part on List page, Open All Projects form and here it goes










Happy Daxture!ng


Viewing all articles
Browse latest Browse all 64797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>