I want to add a `Reqnum` column to the Podtl section of the Purchase Order Entry page

I want to add a Reqnum column to the Podtl section of the Purchase Order Entry page.

Is this correct?

I’ve already done it, but the information isn’t showing up. Did I miss any steps?

You added a column to a dataview, but its just like opening an excel file with a table that has 100 rows, and adding a new column header. It’s empty, so it defaults (default for a number is 0) and now you need to populate it.

If you check the network call for POSvc/GetByID, it does not return ReqNum:

put a bpm (post) on that call to populate the ReqNum field into the dataset.

You will need to do something like (C#):

foreach (var r in result.PODetail) {
    var req = Db.ReqDetail.FirstOrDefault(x => x.PONUM == result.POHeader[0].PONum);
    r["ReqNum"] = req?.ReqNum ?? 0;
}
2 Likes

My Reqnum is in Porel.

Put this Post BPM on Erp.BO.PO.GetByID:


foreach (var r in result.PODetail) {
    var req = Db.PORel.FirstOrDefault(x => x.PONum == result.POHeader[0].PONum);
    r["ReqNum"] = req?.ReqNum ?? 0;
}

But note that it will only look at the first release.

1 Like

I did as you instructed, but the information hasn’t arrived yet.


Oops, sorry, I gave you bad code. I’m already tired now!

Here is correct code

foreach (var r in result.PODetail) {
    var req = Db.PORel.FirstOrDefault(x => x.PONum == r.PONUM && x.POLine == r.POLine);
    r["ReqNum"] = req?.ReqNum ?? 0;
}
1 Like

Okay, I got it. Thank you so much for making me work so hard.

1 Like

Why, when I preview or save the page, does the column not show up?


Hmm, maybe try reset to default first?

How do I reset the settings?

This button:

Did you put your customized layer T1 on the menu? and are you launching it from the customized menu item?

If you press F12 to launch dev tools, then switch to console,

then type in:

epDebug.setDebugModeStatus(true)
epDebug.context
and you hit the arrow next to context to expand it,
does it show your layer T1 here?

1 Like

I have performed a reset. It appears that the preview form has a ReqNum, but the actual form does not.


It sounds like you now need to go to menu maintenance, ALL, search for “Purchase Order Entry” - load it - use the 3 dot menu to copy to current company - save - then apply the customization layer T1

1 Like

What word should I put here?

Doesnt matter, this is for audit trail. Make sure that you click the cloud icon to publish before putting on menu.



I clicked the cloud, but the system is asking me to fill in some information. What should I enter?

no matter. it’s for audit purpose “why was this changed” - enter any text or none.

1 Like


Wow, I did it! Thank you so much for your advice. I wouldn’t have gotten my work done without you.

2 Likes

Great!

Together we are strong, my friend :slight_smile:

1 Like

Thank You