Solved

FOB Point on Drop Ship Purchase Order not carrying over to Sales Order

  • 24 April 2024
  • 3 replies
  • 27 views

Userlevel 6
Badge +3

In 23R2, when you create a drop ship purchase order and select a value in the FOB Point field, then create a Sales Order from the Purchase Order, the FOB Point value is not being transferred to the Sales Order.

Is this expected behavior or is this a bug?

As a workaround, I’m trying to add an event handler to the CreateSalesOrder action.  However, I believe this action is actually in the public class DropShipLinksExt : PXGraphExtension<POOrderEntry> extension.

 

    public class POOrderEntry_Extension : PXGraphExtension<POOrderEntry>
{
public static bool IsActive() => true;

[PXOverride]
public IEnumerable createSalesOrder(PXAdapter adapter, Func<PXAdapter, IEnumerable> baseMethod)
{
PXGraph.InstanceCreated.AddHandler(delegate (SOOrderEntry graph)
{
graph.RowUpdated.AddHandler<SOOrder>(delegate (PXCache sender, PXRowUpdatedEventArgs e)
{
SOOrder objSOOrder = e.Row as SOOrder;
if (objSOOrder != null)
{
sender.SetValueExt<SOOrder.fOBPoint>((object)objSOOrder, Base.Document.Current.FOBPoint);
}
});
});
return baseMethod(adapter);
}
}

In my override, I have an error:

 

Should I be overriding the DropShipLinksExt?  If so, how?  I’ve tried doing this but it creates an error as well:

 

If you think that this topic is due to a bug, let me know what you think.  I may need to submit a ticket with support.  I don’t want to submit a support ticket if this is an expected behavior.

 

 

icon

Best answer by Joe Schmucker 24 April 2024, 18:25

View original

3 replies

Userlevel 6
Badge +3

I hate answering my own questions.  I figured out how to override a graph extension and my code now updates the Sales Order FOB Point field as I want it to.

This is the working code:

    public class myDropShipLinksExt_Extension : PXGraphExtension<DropShipLinksExt, POOrderEntry>
{
public static bool IsActive() => true;

[PXOverride]
public IEnumerable CreateSalesOrder(PXAdapter adapter, Func<PXAdapter, IEnumerable> baseMethod)
{
PXGraph.InstanceCreated.AddHandler(delegate (SOOrderEntry graph)
{
graph.RowUpdated.AddHandler<SOOrder>(delegate (PXCache sender, PXRowUpdatedEventArgs e)
{
SOOrder objSOOrder = e.Row as SOOrder;
if (objSOOrder != null)
{
sender.SetValueExt<SOOrder.fOBPoint>((object)objSOOrder, Base.Document.Current.FOBPoint);
}
});
});
return baseMethod(adapter);
}
}

I still am wondering if this is a bug that I should report.

Userlevel 7
Badge

Thank you for sharing your solution with the community @Joe Schmucker!

Userlevel 6
Badge +3

According to Acumatica Support:

Hello Joe,

I have reviewed your case, tested it on my local demo, and I confirmed that it's a standard functionality, the system does not transfer the FOB Point value from the Dropship PO to SO.

However, The customization you are using is necessary to default the FOB Point from the the drop ship PO to SO.

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved