0

I have written a C# web service and it has a web method that gets last inserted Account object from Salesforce by using Salesforce Web Service API after that inserts these datas to an MSSQL database. I want to invoke this web service after an insert process of Account object from Salesforce. How can i invoke this web service inside of an Apex trigger(After Account insert) ? Any help would be appriciated.

2

Since you are trying to transfer the Salesforce Account into your SQL database, you can make use of APEX Callouts and call your webservice from your trigger on Accounts.

Also, your don't need to call Salesforce API again from your webservice to get the Account details. you should just be passing the required fields from Account record to your webservice that you need to map in your SQL database

You can go through these Salesforce References to know more about making Apex Callouts ..

Apex Callouts

Invoking Apex Callouts

Testing Callouts

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.