REST Post Request No Errors But Record Not Created

I am trying to create a new record in the CRMCall table via REST. It works in both Epicor REST Help and in Postman. I trying to do this in VBA (Outlook). The specifics of the object that contains my POST request are:

    With objRequest
    .Open "POST", strURL, blnAsync
    .setRequestHeader "Authorization", "Basic (encrypted username/pw)"
    .setRequestHeader "Content-type", "application/json"
    .setRequestHeader "Accept", "application/json"

    .Send (JsonBody)

JsonBody contains the necessary fields to create the record. Again, it works in REST Help and in Postman, but a new record does not result if doing via VBA. I’ve tried both:

  • with/without the ‘Accept’ header
  • blnAsync set both True/False

The response reports that ‘The requested resource does not support http method POST.’

Does anyone have any ideas as to what I might be overlooking?

Interesting… is it something with VBA syntax at this point?

It may have been a VBA syntax issue. See my next comment.

1 Like

It’s possible there was a typo I missed. This morning I retyped the JSON list of fields to POST. I thought it was exactly the same as what failed yesterday, but today the POST created the record in table CRMCall. So POST from VBA is now working for me.

1 Like

Right on Tim, gotta love syntax.