PO Suggestions: Adding fields into landing page

Hi all,

I’m trying to create a post-processing on Erp.BO.POSugg.GetRows to pull in some additional fields to the PO Suggestions landing page using the below custom code.

In this example, I’m trying to bring in the required quantity against the JobMtl table to show demand.

foreach (var row in result.SugPoDtl)
{
    var SugPOData = (from jm in Db.JobMtl
                     where jm.Company == row.Company && jm.JobNum == row.JobNum
                     select jm).FirstOrDefault();

    if (SugPOData != null)
    {
        row["DemandQty"] = SugPOData.RequiredQty;
    }
}

When I add the ‘DemandQty’ field to the grid by adding a column, there isn’t any quantities being populated, I’ve checked via BAQ and as an example JobNum ‘000324’ should have a Required Quantity of ‘7300.00’ yet it shows blank.

No data is returned into the suggestions grid:

Am I missing a step or perhaps using the wrong method? Any advice would be hugely appreciated, thank you so much!

Are you sure that is the method that is being triggered? If you add logging does it show if its working or is it firing at all? Or if you trace the layer what does the result set show on that method call? I just did a search and PO suggestions and this was the method call:
image

Hello Alisa,

Thank you so much for pointing me in this direction, when I load PO Suggestions I get a bunch of things firing off, is there an easy way to identify which method it is please? :slight_smile:

Yeah well you just have to look at the payload to see what data is coming back on each call. I believe its GetRowsPlant. Edit: and which one is populating the data view on that screen.

1 Like

Thank you so much, changed this to GetRowsPlant and now the data is populating :smiley:

2 Likes