You need to sign in to do that
Don't have an account?
Darko Videnov 4
Sending Order and order items data after Order created
Hi all,
I'd like to write a trigger which would send Order ana order item data after Order insert to a third party syshtem through http request post. Do you have any examples for this kind of request post?
I'd like to write a trigger which would send Order ana order item data after Order insert to a third party syshtem through http request post. Do you have any examples for this kind of request post?
Please check this link (https://developer.salesforce.com/forums?id=906F000000092YrIAI). The conversation had discussed the same output as required in your question. Kindly go through it and let me know if you need any help.
Thanks,
Gaurav
skype: gaurav62990
Email: gauravgarg.nmims@gmail.com
populate all the values in the variable and update Wrapper as per your fields.
Thanks,
Gaurav
Skype: gaurav62990
You will have to something like this.
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals');
request.setMethod('POST');
request.setHeader('Content-Type', 'application/json;charset=UTF-8'); // Set the body as a JSON object
request.setBody('{"name":"mighty moose"}');
HttpResponse response = http.send(request); // Parse the JSON response
if (response.getStatusCode() != 201)
{
System.debug('The status code returned was not expected: ' + response.getStatusCode() + ' ' + response.getStatus());
}
Chek below given link to read about
http://khaidoan.wikidot.com/salesforce-developer-integration-callout