Skip to main content
Solved

Getting error when make API call for Sales order entity in the 23R2 instance with Sales demo data

  • December 13, 2023
  • 6 replies
  • 479 views

jinin
Pro I
Forum|alt.badge.img+11

Hi everyone, 

I'm encountering an unusual issue when making an API call with the 23.202 build. I'm trying to change a sales order on hold status using the PutOnHold action, but I'm immediately receiving the following error. Once this error occurs, the subsequent GET call is also not functioning and getting the same error message.

 

  "message": "An error has occurred."

    "innerException": {

        "message": "An error has occurred.",

        "exceptionMessage": "A data corruption state has been detected. You cannot save the changes. Copy the data you have entered and reload the page. Date and Time: 2023-12-13T08:08:38; IncidentID: 8f01c121-fd44-4af9-bf02-6144bb6678c1; Name: Aggregate Validation: PX.Objects.SO.SOOrder+openLineCntr. You can view detailed information about the issue on the System Events tab of the System Monitor (SM201530) form.",

        "exceptionType": "PX.Data.PXException",

        "stackTrace": null

 

Does anyone face this issue? 

Best answer by jinin

Hi @Vignesh Ponnusamy,

I've identified the root cause. A minor spelling mistake in the JSON request, specifically a typo error in the Order type, led to the above issue.

6 replies

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @jinin,

From my testing, I couldn’t reproduce the issue in 23.202 Vanilla(without any customization). To confirm, are you able to reproduce the issue without any customization?

Are you using custom endpoint? Please share more details(Request URL, Payload) of the API call you are making.


jinin
Pro I
Forum|alt.badge.img+11
  • Author
  • Pro I
  • December 13, 2023

Hi @Vignesh Ponnusamy,

I don't have any customizations. I simply extended the Default 22.200.001 endpoint to include the PutOnHold and ReleaseFromHold actions.


Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @jinin,

Thanks for the details.!

That’s strange, I couldn’t reproduce the issue extending the Default 22.200.001 endpoint.

 

 

You can try using the Default 23.200.001 endpoint. Make a POST request with the following URL,

<<Instance URL>>/entity/Default/23.200.001/SalesOrder/PutOnHold

Even though the action isn’t mapped, you should be able to invoke it using the Default endpoint.

If the issue still persists, I would suspect the issue to be instance specific. So you could try deploying a new instance with Sales Demo data. 

Hope that helps.! Good Luck,


jinin
Pro I
Forum|alt.badge.img+11
  • Author
  • Pro I
  • December 15, 2023

Hi @Vignesh Ponnusamy ,

Can you try like below steps,

1- First make the GET call for an order

2- then make an POST call for PutonHold or ReleseFromHold

I tried 2 instances, getting the same issue. 🙁
 

 


Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

@jinin, wow, that’s super strange.!

I couldn’t reproduce the issue with different approach.

Did you try the suggestion(from my previous comment) using Default endpoint(instead of using extended endpoint)?

Also, can you test from a different machine or try a different version of Acumatica? Thanks,


jinin
Pro I
Forum|alt.badge.img+11
  • Author
  • Pro I
  • Answer
  • December 22, 2023

Hi @Vignesh Ponnusamy,

I've identified the root cause. A minor spelling mistake in the JSON request, specifically a typo error in the Order type, led to the above issue.