Skip to main content
Solved

Get Process All Result through REST API

  • September 19, 2022
  • 3 replies
  • 245 views

anahizentella94
Jr Varsity III
Forum|alt.badge.img

Hello!

I’m invoking a processing form through API, and all the process is executed correctly, but, how can I know when a record is processed with errors?

I’m trying to get the processing result to know what records have been processed and what records have raised errors…

 

 

Best answer by Nayan Mansinha

anahizentella94 wrote:

I have created a custom processing form, where I write some data in the document, and when I click on the Process or Process All buttons, creates new documents or displays an error if there is any.

204 response is not designed to return detailed information.  As a workaround, I would say persist success or failure information on to same documents (say in Message field) you processed and make second call to retrieve these documents so that you know which one were successful and which ones resulted in error. e.g.

Endpoint definition -

API calls -

POST ~/entity/DefaultExt/20.200.001/ReleaseBatches/ProcessAll

Use Location header to wait for process to complete

GET POST ~/entity/DefaultExt/20.200.001/ReleaseBatches?$expand=Batches

My 2 cents...

View original
Did this topic help you find an answer to your question?

3 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • 632 replies
  • September 20, 2022

Is there a reason you are executing process all and not just triggering the action for the records one by one? From what I’ve seen so far, executing ‘Process All’ is usually not required.


anahizentella94
Jr Varsity III
Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 37 replies
  • September 20, 2022

Hello Dmitrii, 

I have created a custom processing form, where I write some data in the document, and when I click on the Process or Process All buttons, creates new documents or displays an error if there is any.

 

 


Nayan Mansinha
Community Manager
Forum|alt.badge.img+2
  • Acumatica Developer Support
  • 49 replies
  • Answer
  • September 27, 2022
anahizentella94 wrote:

I have created a custom processing form, where I write some data in the document, and when I click on the Process or Process All buttons, creates new documents or displays an error if there is any.

204 response is not designed to return detailed information.  As a workaround, I would say persist success or failure information on to same documents (say in Message field) you processed and make second call to retrieve these documents so that you know which one were successful and which ones resulted in error. e.g.

Endpoint definition -

API calls -

POST ~/entity/DefaultExt/20.200.001/ReleaseBatches/ProcessAll

Use Location header to wait for process to complete

GET POST ~/entity/DefaultExt/20.200.001/ReleaseBatches?$expand=Batches

My 2 cents...


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings