Application Studio - Add New Column to Purchase Order Entry Landing Page

Hello,

First time posting and very new to Kinetic. I have been researching information on this before I posted but am coming up short. I am trying to add the POHeader.DocTotalOrder Column to the Purchase Order Entry LandingPage.

I followed the Epicor Learning Center example here: Hands-On - My First Layer in Application Studio however I cannot get the data to populate in the grid.

The system dataview does not contain the column I am looking to add though it is associated to the same tables of that which the other data is being returned. What am I missing?

Thanks in advance!

Welcome, Derek!

Since the data isn’t already getting loaded into the data view, you’ll have to figure out how to get that data to the grid.
There are several ways to do it - and each have their place:

  • Use a BPM to inject the data into the response data.
    This is probably the simplest. The Landing Page of PO Entry uses the GetList BO method. Create a post processing method directive to get the DocTotalOrder each row and add it to each row. Then the data will be available on your customized layer.
  • Create and call a BAQ or Epicor Function to get the data and match it to the landing page grid Create and call an Epicor Function to get the data and match it to the landing page grid.
    This can get hairy - fast! You can either call your BAQ or function to get all the pertinent info, then use the dataview-condition widget in an event to match and include that in your grid, or (only if there are very few rows) use a dataview-condition to get the data one row at a time :face_vomiting:
  • Call a different BO method that contains your field in the response.
    This can get complicated - probably not a great idea in this case
  • Something else I’m probably forgetting…

Things get more complicated when the sorting changes, or when the grid gets refreshed, or other base (or customized) events do unexpected things with the data.

Hi Jonathan,

Thanks for the quick reply. I hate to say but I don’t know the first thing about creating BPMs. I’ve been playing with it since your reply and haven’t been able to link any BO methods. Seems really complex just to add a column to a landing page grid…

1 Like

It is complex. If you agree Epicor should make this simple, please vote: Log In - Epicor Identity

3 Likes

Alisa,

Thanks for sharing the Ideas link, I upvoted.

2 Likes

I was in your shoes about a year ago - it is a lot to learn! and I’m still on here getting my mind blown every day :sweat_smile:

When getting just a few fields inside a BPM, I would use the Db context to pull it. Something like this in a custom code widget:

…and not directly related, but I’m just going to throw this in here for good measure, because it can save a lot of time banging your head against the wall:

And now that I posted, I followed the link you posted, @aosemwengie1, and you make it sound like even using a BPM you can’t add to the data set…

Did I read that right? :grimacing:

Using the bpms it works fine. Depending which screen, it can be complicated to figure out all the methods required. Like for sales order detail, its 4 different methods.

2 Likes

At least we can get somewhere… just with a lot of effort.
Thank you!

1 Like

I just did the same customization yesterday
Add a Post proceesing BPM to method directive to Erp.BO.PODetailSearch.GetList using this code
image

foreach (var row in result.PoDetailSearchList )
{
var PoheadData = Db.POHeader.Where( x=> x.Company==row.Company && x.PONum==row.PoNum).FirstOrDefault();
if (
PoheadData!= null
) {

row["POTotal"]=PoheadData.DocTotalOrder;

}

}

next then add “POTotal” as new column to your grid

4 Likes

I did the same for few screen in the past however, the filter methods on the landing page does not work, its greyed out. Have you gotten that to work?

2 Likes

This is phenomenal, thank you so much. I am going through and designing this.

1 Like

Hi Adam,

For my own knowledge and potential re-use of this for something similar in the future, could you explain how you know where to find the different elements needed for the Custom Code? Or a little bit about how it works? Very reminiscent of PowerShell from my prior experience.

2 Likes

I hear you! I’ll work on it.

1 Like

Since I’m not a developer, I try to solve my cases with as little C# or LINQ coding as possible. Once you understand the basics, this level can handle most user requirements!

You might check out this topic - it’s a great collection of coding strategies:

I utilized this and it works great! However, I added the Due Date and Promise Date columns and when trying to filter or sort on them it throws the following error:

Business Layer Exception

undefined

Error Detail
============

Program: Erp.BO.PODetailSearchSvc
Method: GetList

Any way to filter and/or sort on those added date columns?

I ran into the same issue, was looking to see if there is a way to do this.

I had heard of this issue, but haven’t thought about it much.
Now I’m planning to spend some time looking into it tomorrow