Skip to main content
Answer

POReceiptEntry graph extension: how do I get the SOOrder related to the POOrder?

  • January 16, 2025
  • 7 replies
  • 68 views

Forum|alt.badge.img+2

I need to get some SOOrder extension values that I don’t have in my POReceipt.  Is there a way to code this in C# in my POReceiptEntry graph extension?

Best answer by bpgraves

public PXSelectReadonly<POOrderReceipt, Where<POOrderReceipt.receiptNbr, Equal<Required<POOrderReceipt.receiptNbr>>>> KCPOOrderReceipt;
public PXSelectReadonly<POOrder, Where<POOrder.orderNbr, Equal<Required<POOrder.orderNbr>>>> KCPOOrder;
public PXSelectReadonly<PX.Objects.SO.SOOrder, Where<PX.Objects.SO.SOOrder.orderNbr, Equal<Required<PX.Objects.SO.SOOrder.orderNbr>>>> KCOrderByOrderNbr;

POReceipt receipt = Base.Document.Current;

POOrderReceipt poOrderReceipt = KCPOOrderReceipt.Select((object)receipt.ReceiptNbr);
if (poOrderReceipt != null && !string.IsNullOrEmpty(poOrderReceipt.PONbr))
{
    POOrder poOrder = (POOrder)KCPOOrder.Select((object)poOrderReceipt.PONbr);
    if (poOrder != null && poOrder.OrderType == "DP")
    {
        SOOrder order = this.KCOrderByOrderNbr.Select((object)poOrder.SOOrderNbr);
    }
}

7 replies

Forum|alt.badge.img+7
  • Captain II
  • January 16, 2025

You need to have an audit trail to follow. Is there any data that you can see on your POReceipt that you can use to go back to the SO? Is your PO a drop ship?


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • January 16, 2025

You need to have an audit trail to follow. Is there any data that you can see on your POReceipt that you can use to go back to the SO? Is your PO a drop ship?

Yes, to both questions. I do have the SOOrderNbr in the POOrder which is a drop ship.  How do I get the SOOrder (using C#) in my POReceiptEntry graph extension?  I’m assuming I need to get the POOrder first and then find the SOOrder using the SOOrderNbr in POOrder.


Forum|alt.badge.img+7
  • Captain II
  • January 16, 2025

I’m assuming I need to get the POOrder first and then find the SOOrder using the SOOrderNbr in POOrder.

 

You got it!

It would be worth it going through the developer courses as you’ll get a sense of how to look at a screen/graph and figure out what views you can access.

 


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • Answer
  • January 17, 2025

public PXSelectReadonly<POOrderReceipt, Where<POOrderReceipt.receiptNbr, Equal<Required<POOrderReceipt.receiptNbr>>>> KCPOOrderReceipt;
public PXSelectReadonly<POOrder, Where<POOrder.orderNbr, Equal<Required<POOrder.orderNbr>>>> KCPOOrder;
public PXSelectReadonly<PX.Objects.SO.SOOrder, Where<PX.Objects.SO.SOOrder.orderNbr, Equal<Required<PX.Objects.SO.SOOrder.orderNbr>>>> KCOrderByOrderNbr;

POReceipt receipt = Base.Document.Current;

POOrderReceipt poOrderReceipt = KCPOOrderReceipt.Select((object)receipt.ReceiptNbr);
if (poOrderReceipt != null && !string.IsNullOrEmpty(poOrderReceipt.PONbr))
{
    POOrder poOrder = (POOrder)KCPOOrder.Select((object)poOrderReceipt.PONbr);
    if (poOrder != null && poOrder.OrderType == "DP")
    {
        SOOrder order = this.KCOrderByOrderNbr.Select((object)poOrder.SOOrderNbr);
    }
}


Forum|alt.badge.img+2
  • Author
  • Semi-Pro I
  • January 17, 2025

I’m assuming I need to get the POOrder first and then find the SOOrder using the SOOrderNbr in POOrder.

 

You got it!

It would be worth it going through the developer courses as you’ll get a sense of how to look at a screen/graph and figure out what views you can access.

 

Can you be more specific about what “developer courses” you are referring to?  I took the development video training years ago.  Did it change or get more specific recently?


DipakNilkanth
Pro III
Forum|alt.badge.img+13

Hi ​@bpgraves,

This is the link for Development courses which are essential to start the development in Acumatica.
 


Forum|alt.badge.img+7
  • Captain II
  • January 17, 2025

If you log on to Acumatica.com and click on “Learn” at the top you’ll be taken to Acumatica’s Litmos site and there is an Application Developer training path. There are seven courses (T200, T210, etc) that cover a good portion of what you’ll encounter when customizing Acumatica. There’s also the Framework Development Guide which is a good reference. They’re kept very up to date.

Edit: ​@Nilkanth Dipak provided a more succinct link to those course materials.

The online help references those training courses as well.

And, to be fair, your specific question isn’t covered in the documentation but once you’ve gone through those you should feel more comfortable with navigating around the data and the graphs to get what you’re looking for.