Skip to main content
Question

REST API: How To Create a Change Order Related To an Order?

  • March 11, 2026
  • 3 replies
  • 29 views

Hello. I’m trying to create a REST call to update a Sales Order record, and at the same time (if possible) to create a Change Order related to it.

In my instance, the Change Orders are here, under this tab inside the Sales Order:

 

 

The reason why I need to create this record, along with my update to the Sales Order, is that my instance currently has a validation which requires to create a Change Order every time that the Sales Order is updated. For example, In the UI I see this prompt:

 


Without this record, the changes made to the SO aren’t saved to the database. 

 

​​​Thanks, any advice would be greatly appreciated.

3 replies

  • Author
  • Freshman I
  • March 13, 2026

Update: I thought that the ‘Change Order’ was a standard entity, however I see that is a Custom entity. The real question would be how to update a record, and insert a child custom record using the API? if someone could provide a query example it’d be very useful.

Thanks!


Forum|alt.badge.img+9
  • Captain II
  • March 13, 2026

@JuanMVerndale 

 

How is this logic working currently? Is it through customisation?


KrunalDoshi
Varsity I
Forum|alt.badge.img
  • Varsity I
  • March 20, 2026

Hi ​@JuanMVerndale,

You need to write a customization by extending the Sales Order graph (PX.Objects.SO.SOOrderEntry) by extending Persist method to create a Change Order as you need to create or update the Change Order record every time as and when the Sales Order is modified. This will automatically be executed when you push Sales Order from API. 

Alternative, you can modify your Web Service Endpoint (SM2070PL), extend then one you are using and add your custom tab to the Sales Order, similar to how it has Commissions, Payments, etc., so you can include the data for Change Order while pushing the Sales Order from API. Hopefully this helps!