Scenario
I had an integration requirement where an external system needed to update a custom field on an Acumatica Shipment (SO302000) after the shipment had been processed.
The objective was simple: allow the external system to write back an integration status without making the entire Shipment document editable.
However, I encountered an interesting behaviour.
The REST API PUT request returned 200 OK, but the custom field value did not change.
There was no obvious error in the response.
What was happening?
The Shipment was already in a Confirmed state.
Acumatica applies workflow-driven field states to documents. When a document reaches a locked state, fields can become unavailable for editing.
In my scenario, the custom field was also affected by the document's field-state configuration.
This meant that receiving a successful API response was not sufficient evidence that the requested field had actually been persisted.
What was the approach?
The customization involved two areas:
1. Workflow customization
Configure the relevant Shipment workflow state to keep the required custom field enabled while retaining the intended restrictions on other fields.
2. Graph extension
Use a RowSelected handler to manage the field states, allowing the required custom field to remain editable while keeping the other fields disabled.
public class SOShipmentEntry_Ext : PXGraphExtension<SOShipmentEntry>
{
public static bool IsActive() => true;
protected virtual void _(Events.RowSelected<SOShipment> e)
{
SOShipment row = e.Row;
if (row == null || row.Confirmed != true) return;
e.Cache.AllowUpdate = true; // let the record be saved
PXUIFieldAttribute.SetEnabled(e.Cache, row, false); // ...but lock every field
PXUIFieldAttribute.SetEnabled<SOShipmentExt.usrIntegrationStatus>(e.Cache, row, true); // except ours
}
}
Key takeaway
When integrating with Acumatica, don't assume that an HTTP 200 OK automatically means every requested field has been persisted.
For workflow-controlled documents, validate the actual result by reading the record back after the update.
A question for the Acumatica developer community
Has anyone implemented this requirement using workflow customization alone, without a graph extension?
I'd also be interested in hearing how others handle external system write-backs on confirmed or completed documents while preserving the document's business controls.
#Acumatica #RESTAPI #Customization #ERPIntegration