Search code examples
dynamics-business-centraldynamics-al

Business Central API: Close a Sales Return Order


As the heading says I want to close a Sales Return Order form via the API but I have very little information on how to achieve that.

  1. A third-party app is installed in the customers Business Central which task is to create return orders from eCommerce into Business Central
  2. I have set up a webservice so that my application can get all return orders from the business central
  3. The Last step is to close/post all the return orders via the api after the application has handled them.

This is the first time for me working with a sales return order in BC and what I have read is that I can be quite tricky since there is no documentation.

Q: Do I need to develop an action with AL to achieve that?


Solution

  • At the moment there is no standard API in Business Central for Sales Return Orders.

    This means the answer to your question is: Yes, you must extend Business Central with the requested functionality through AL.

    Have a look at how the ShipAndInvoice procedure is implemented in the Sales Orders API. It is basically the same you want to do for Sales Return Orders.

    Take a look at this question here on StackOverflow regarding how to call the bound action on the API.