Ok, I see. Now the issue is the method. I’ve done a trace and it looks like the table that I need (SugPoDtl) is being pulled in through GetDatasetTables with a few others. Is this the method I should modify?
That looks like it’s building the dataviews for storing the data for the page.
I would suggest looking at the GetRowsPlant method that has the data for the grid:
So then you go create a BPM for Erp.BO.POSuggSvc/GetRowsPlant
I’ll write up an example as I have time
Thank you, so much!
You can try something like this in a custom code widget in your BPM:
if (result.SugPoDtl.Count < 1)
{
return; // There are no rows, so no need to add anything. Do nothing.
}
string thisCompany = callContextClient.CurrentCompany;
var allParts = result.SugPoDtl.Select(sugPoDtl => sugPoDtl.PartNum).Distinct().ToList(); // This grabs a list of all the parts in your suggestions
var partInfo =
Db.Part
.Where(part => part.Company == thisCompany && allParts.Contains(part.PartNum)) // This filters to only the Parts relevant to your grid
.Select(part => new { PartNum = part.PartNum, UDField = part.ShortChar02 }) // This grabs just the info needed per Part
.ToList(); // This runs the query and makes a list you can use repeatedly
foreach (var sugPoDtl in result.SugPoDtl)
{
string sugPoDtl_PartNum = sugPoDtl.PartNum; //
var thisPartInfo = partInfo.FirstOrDefault(pi => pi.PartNum == sugPoDtl_PartNum); // Match the Part info to the SugPoDtl
// At this point, we have one SugPoDtl and one object with Part UD Field ... so set the value for your grid:
sugPoDtl["MyUDField"] = thisPartInfo.UDField;
}
Let me know if you have any questions. I didn’t actually test this, just patterned it after another BPM I have
Note: I used the ternary conditional operator (?) to check for a null value there at the end
it’s basically the same as:
if (thisPartInfo == null)
{
sugPoDtl["MyUDField"] = ""; // then store an empty string
}
else
{
sugPoDtl["MyUDField"] = thisPartInfo.UDField; // otherwise, give me its UDField value
}
It’s just a lot less wordy
Thank you Jonathan! I’ll try this out and let you know.
Jonathan I finally got time to try this. Unfortunately, when i run the PO Suggestions now, I’m getting two errors. Both look like this:
Here is the custom code:
Not sure what I’ve done wrong or missed. Code compiles fine.
Kathie
Ok, never mind. I was able to get the errors resolved. Sorry to bother.
Jonathan, all working now! My UD column is coming in and it all looks good. Thank you so much for all your help. I really appreciate it.
Kathie
Sorry I wasn’t able to help this time - I got pulled away right after I saw your message - but I’m glad to hear you got it working!
No worries, I understand. I appreciate all your help!
I followed these instructions but still am not seeing it populate into the grid. I see the matches.{field} get updated in the row update with the value but I am not seeing it populate in the grid. I added JobMtl_PartNum into the SchedulingBoard dataview.
Filter the BAQDataView:
Updating the added column in the schedulingboard data view with the BAQDataView:
We see it filters and does a row update:
Nothing populated:

This field is set to SchedulingBoard.JobMtl_PartNum. Should the EPBinding be set to something else??
Nevermind needed to add the column field as the field name on the dataview not the ep binding… Thanks!
Does anyone know if it’s possible to use a mdi icon in an added column?
Would like to create a situation that a person can click on a in-line print icon.
My BAQ View is not getting any data. What am I missing?
I imagine you’re missing an event to populate your view.
I have all the right events and such
I am trying to do this on the purchase Advisor screen