Announcements
Requirement: Auto populate Buyer Group from Purchase Requisition to Purchase Order during automatic PO creation through batch job in D365FO.
Scenario:
BuyerGroup field added in PurchTable.
Purchase Requisition goes through RFQ process.
RFQ is accepted/rejected.
After requisition approval, batch job creates Purchase Order automatically.
Requirement is to transfer BuyerGroup value from Purchase Requisition to PurchTable during PO creation.
Analysis: Batch class PurchReqPurchaseOrderGenerationBatch only creates release strategy batch tasks and does not directly insert PurchTable records.
PurchReqPurchaseOrderGenerationBatch
The actual PurchTable preparation happens in class: PurchAutoCreate_PurchReq
PurchAutoCreate_PurchReq
Standard method identified:
public void createPurchTable() { purchTable.setPriceDiscChangePolicy(PriceDiscSystemSource::PurchaseReq); purchTable.initInvoiceAccount(); this.copyPurchReqDeliveryDateToPurchTable(); purchTable.calculateRequestedShipAndReceiptDate( dateNull(), purchTable.DeliveryDate, SchedDirection::Backward); purchTable.SkipShipReceiptDateCalculation = true; super(); }
Question: What is the best practice to populate custom BuyerGroup field into PurchTable during automatic PR to PO creation?
Should the value be assigned before super()?
super()
Or should CoC extension update PurchTable after creation?
Has anyone implemented similar customization in PR → RFQ → PO auto generation flow?
Thanks, Subra.
Yes, the purchase requisition buffer is available in the same method. I checked the standard class, and the purchReqTable buffer is already declared and initialized in PurchAutoCreate_PurchReq.
purchReqTable
So, I used a CoC on setPurchTable() and assigned the value directly without adding additional select statements.
setPurchTable()
void setPurchTable() { next setPurchTable(); PurchRFQCaseTable purchRFQCaseTable; if (purchReqTable.RecId) { purchTable.ItemBuyerGroupId = purchRFQCaseTable.ItemBuyerGroup; }
Could you please confirm if this is the correct approach?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 681 Super User 2026 Season 1
André Arnaud de Cal... 598 Super User 2026 Season 1
Giorgio Bonacorsi 579