BPM Dilema - How can I update PO Line after PO Suggestion😅

Hey Epicor Wizards,

We are creating POs from Requisitions through PO Suggestions. Since Epicor does not have a standard subcontract requisition type, we decided to add our own custom fields in Requisition Entry to capture the subcontract details. Because apparently, one more customization never hurt anyone… right? :grinning_face_with_smiling_eyes:

After the PO is created, we are trying to push the subcontract information from the requisition into the PODetail (JobNum, Assembly, Mtl Seq, etc.).

The interesting part is that PORel is happily accepting the updates through our code, but PODetail is acting like it has never heard of those fields before. :sweat_smile:

Has anyone customized the PO Suggestion process in Epicor Kinetic SaaS? Is there a better BPM/event or recommended approach to update the PO Line after the PO is generated, based on values or flags from the originating requisition?

Would love to hear from anyone who has already explored this path. :slightly_smiling_face:

Id be curious to see your code, and if you have it in a PRE or POST directive.

I see in the example you have 2 releases, if they are for two different jobs then that info doesn’t show at the line level.

If it is 1 release it would display the info on the line

WARNING: I am NOT a programmer. The following works and did what my client asked for, but not guarantees on quality of work!

I had a client that needed Project and Sales Order values (also UD fields on the ReqDetail table) brought to the PO Release. I just created an InTrans Data Directive on PORel that copied the values directly:

foreach(var x in ttPORel.Where(r=>r.Added()))
{
	x.ProjectID = (from proj in Db.ReqDetail where proj.ReqNum == x.ReqNum && proj.ReqLine == x.ReqLine select proj.ProjectID_c).FirstOrDefault();
    x.BTOOrderNum = (from proj in Db.ReqDetail where proj.ReqNum == x.ReqNum && proj.ReqLine == x.ReqLine select proj.OrderNum_c).FirstOrDefault();
    x.BTOOrderLine = (from proj in Db.ReqDetail where proj.ReqNum == x.ReqNum && proj.ReqLine == x.ReqLine select proj.OrderLine_c).FirstOrDefault();
    x.BTOOrderRelNum = 1;
}

Here is what I did in the past @Ernie took some time to get the grouping correct, to account for every scenario and when Epicor decides to create a single line vs multiple lines vs multiple releases (all depending on few variables and settings).

// Pass Values to Newly created POs
//
// NOTES:
//  Epicor creates a new PO when any of the following changes:
//  Grouping Algorithm:
//
//  New POHead GroupBy = BuyerID, VendorNum, PurPoint, ShipViaCode, TermsCode, FOB
//  New PODtl GroupBy = PartNum, IUM, PUM
//  New PORel GroupBy = SugNum processed
//