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?
Solved
Inserting Record Through REST API and Getting A Warning Back?
Best answer by Dmitrii Naumov
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.