OData CRUD operations RRS feed

  • Question

  • Hello gyus,

    I'm wondering if anybody can give some examples of Ajax code for updating or deleting records via the AX 2016 OData CRUD operations.

    I have my data entity set up and I can load the data successfully via the "GET" http request, but couldn't update or delete any records by sending "POST" or "DELETE" http request.

    For example, with the code below, I'm hoping my browser will send a request with "DELETE" method, but actually my IE 11 will send a "POST" and I would get 403 Forbidden error in the http response. The url "/data/MyEntityCollectionName" is where it loads the OData with no issues.

    Request Header: POST /data/MyEntityCollectionName HTTP/1.1

      url: baseUrl,
      type: "DELETE",
      dataType: "json",
      success: function(result) {
      error: function(result) {

    btw, I have checked following articles:




    • Edited by Marvin Liu Wednesday, June 22, 2016 11:16 PM correction
    Wednesday, June 22, 2016 11:12 PM

All replies