Skip to main content
Solved

Issue with Completing Purchase Orders via Extended Endpoint in MYOB Advanced

  • January 10, 2024
  • 1 reply
  • 144 views

Hi everyone,

I recently set up a new instance in MYOB Advanced and extended a new endpoint specifically for managing Purchase Orders. I'm trying to complete a purchase order through this endpoint, but I keep encountering an error. I'm hoping someone might be able to shed some light on this issue.

Endpoint and Request: I'm sending a POST request to:
POST http://localhost/MyStoreInstance7/entity/Default/1.1/PurchaseOrders/CompleteProcessingCategory

With the following JSON body:
{
  "entity": {
    "OrderNbr": "PO001326"
  }
}

Response: However, I'm receiving a 500 Internal Server Error with the following details:
{
    "message": "An error has occurred.",
    "exceptionMessage": "Operation failed",
    "exceptionType": "PX.Data.PXInvalidOperationException",
    "stackTrace": "...",
    "innerException": {
        "message": "An error has occurred.",
        "exceptionMessage": "The Complete Order button is disabled.",
        "exceptionType": "PX.Data.PXActionDisabledException",
        "stackTrace": "..."
    }
}

It seems that the "Complete Order" button is disabled, but I'm not sure why this would be the case, especially since the button is not disabled when I check in the MYOB Advanced UI and API user has access. Has anyone encountered a similar issue or have any suggestions on how to resolve this? Any insights or advice would be greatly appreciated.

Thank you in advance!

Best answer by matthewgerdan

Hi,

 

Have you tried adding the OrderType property to the entity.

It may also need to be added as Type

 Acumatica REST API Endpoint Action Call fails - Stack Overflow

1 reply

Forum|alt.badge.img
  • Varsity I
  • Answer
  • January 12, 2024

Hi,

 

Have you tried adding the OrderType property to the entity.

It may also need to be added as Type

 Acumatica REST API Endpoint Action Call fails - Stack Overflow