Table of Contents

Update Operations

ERP.net supports updating entities using the PATCH method, which performs partial updates.
Only the fields included in the request are modified; all other properties remain unchanged (except dependent properties updated by business rules triggered on attribute change).

Key Points:

  • Use PATCH to modify one or more fields of an existing entity.
  • You do not need to send the entire entity.
  • Always consider property dependencies — some fields must be set in a specific order (e.g., QuantityUnit before Quantity, Currency before Amount).
  • Business rules and validations defined in the front-end or back-end models will be applied depending on how the data is processed.
  • ERP.net supports optimistic locking to prevent conflicts during concurrent updates. Learn more in Optimistic Locking.

Example: Updating the notes of a sales order:

PATCH https://testdb.my.erp.net/api/domain/odata/Crm_Sales_SalesOrders(f3fe442a-d5fe-49a9-8bda-00c895d630bb)
Content-Type: application/json

{
    "DocumentNotes": "Updated sales order description"
}

Required Considerations:

  • If updating fields involved in calculations or triggers, ensure dependent properties are included in the correct order.
  • Only include fields you intend to modify; others will remain unchanged.
  • System and user business rules will execute as appropriate (front-end rules on attribute changes, back-end rules on commit or document events).

For more details on entity properties and rules, refer to the documentation of each entity. Foe example Sales Orders Documentation.

Notes For concurrency control and optimistic locking see Data Sync topic.