HTTPS PATCH Request Hi Guys, We are trying to cre...
# integrations
a
HTTPS PATCH Request Hi Guys, We are trying to create a salesforce integration that updates a custom property. We are facing a challenge that Netsuite does not seem to be requesting the request/PATCH
const header={
"X-HTTP-Method-Override":"patch",
"Content-Type": "application/json",
"Authorization": "Bearer " + token,
'Accept': 'application/json',
}
const response = https.request({
method: <http://https.Method.POST|https.Method.POST>,
url: url,
headers: headers,
body:JSON.stringify(recordData)
});
m
a
but there's no work-around to get this done
n
What are you calling? Maybe you could add a parameter that stipulates a patch call is being made and pick that up in the endpoint if you have control of it? Hard to say without knowing the architecture you're talking about.
👍 1
m
Might need to use some sort of intermediary system to facilitate the request.
s
Is a custom Apex REST web service possible? That would allow use of supported verbs like PUT and POST
a
@scottvonduhn I have sent to the salesforce team to provide custom APIs to get this job done. I have work-around to get this task done but prefer to be native way. I can add client side script 1.0 that will call http request on save record, but in case there's CSV import or any background task that may fail. also think to have user-event to call suitelet and passing the body request as params to the suitlet and send the request from suitlet.
s
Custom Apex endpoints in Salesforce are no less native than a Restlet or Suitelet script in Netsuite. They provide more flexible ways of integrating than are possible via SOAP alone. The equivalent in NetSuite would be to have no SuiteScript, and rely solely upon SuiteTalk. There are some things that would be difficult to do with SuiteTalk alone.