Skip to main content
Solved

Inserting Record Through REST API and Getting A Warning Back?

  • February 6, 2026
  • 3 replies
  • 26 views

zherring
Freshman II
Forum|alt.badge.img

I am using REST API to insert a record. 

Normally, when you manually insert the record from the UI screen, we have custom logic to throw a warning by using e.Cache.RaiseExceptionHandling and PXSetPropertyException and PXErrorLevel.Warning. This allows the user to insert the record with no issues and then later on when they click a “Validate” button in the workflow of that screen our logic will decide what to do.

The problem is that when inserting this same record using REST API we do not see that warning reflected back in the JSON response. It seems that the only way to see the error reflected back is to actually have an error be thrown rather than just a warning.

It would be pretty simple to just save this warning to a field and then add that field to our endpoint.

BUT I would like to know if there are any better ways to do this? 

Best answer by Dmitrii Naumov

@zherring There is no better way unfortunately. 

3 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • February 6, 2026

@zherring There is no better way unfortunately. 


zherring
Freshman II
Forum|alt.badge.img
  • Author
  • Freshman II
  • February 6, 2026

@Dmitrii Naumov Further question. Unless I want to dive into webhooks I will just use a string field to set this warning message. That being said, currently my warnings are being generated from a FieldVerifying event so now I am unsure how I should go about setting this field? Acuminator warns against modifying a DAC instance passed to a FieldVerifying event.


Forum|alt.badge.img+8
  • Captain II
  • February 6, 2026

Something to try is to create a non-persisted string field to the DAC for the warning message and then add it to the web endpoint. Then you can populate that field when there is a warning or an error condition and that value should be returned back.