Skip to Content

When create purchase order from purchase request using script, how can create PriceCalculationItem?

Hi experts,
In Bydesign System, the business: create a sales order, the purchase request and purchase order will auto create.
The purchase request is created by system(system configuration), and the purchase order must be created by the program.
And the purchase Order's price copy from sales order's price.

About the program, now I create a purchase Order using CreateFromPurchaseRequest() script, but the purchase Order can't create the PriceCalculationItem.

var po_item = PurchaseOrder.CreateFromPurchaseRequest();

var po_item_price = po_item.PriceCalculationItem.Create();

var po_item_price_Price = po_item_price.ItemMainPrice.Create();
var po_item_price_Surcharge = po_item_price.ItemMainSurcharge.Create();
var po_item_price_Discount = po_item_price.ItemMainDiscount.Create();

the po_item_price and po_item_price_Price return null.
Any idea to create the PriceCalculationItem of the PurchaseOrder?

Thanks in advance.
Best Regards,
Benny Huang

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 03 at 12:31 PM

    Dear Benny,

    I checked some information and I recommend to you to open an incident to check it further.

    With this action, we'll be able to help you with this process.

    Any doubt, please, let me know.

    Add comment
    10|10000 characters needed characters exceeded