function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Triggering changes from Sales Force to MS Sql Server



I am aware of the Apex Trigger in Sales Force, but Is there anyway to make Insert/Update from Sales force to MS Sql Server? If I create Web Service, then it needs to be called from externally.


Assume I have this scenario. If someone creates account in Sales Force, it should trigger an event and send this Account Information to MS Sql Server DB of our organization. Once its inserted in our Sql DB, it will create particular AccountID and give it back to Sales Force. The reason I need to accomplice this is our Account creation process used to start from Our own website so it was creating AccountID (Auto Generated) from DB and used from Primary identification for Account across system. Now we want to create Account from Sales Force but need to keeep AccountId generated from DB only.


How can I accomplice this?

Mario VMario V

There are several ways to do this, depending on whether you need the AccountID creation to be immediate or not, and the development environment in which you feel more confortable.


If your Accounts can stay in Salesforce for a few hours without an AccountID, I think the easiest solution is an application that runs periodically, polls Salesforce (using the API web service) for new Accounts, creates the IDs in your SQL Server and assigns them.


Otherwise I can suggest two options:


-  Build a web service that assigns and returns an AccountID. Make a Apex trigger that is called when an Account is inserted; it will calll this web service, retrieve the AccountID and assign it to the new Account.


- Build a web service that assigns an AccountID, and calls the Salesforce API web service to assign it to an Account. Create a workflow rule in Salesforce so that when an Account is inserted, it will send an Outbound message to your web service.

Osvald MarkusOsvald Markus
You can easily accomplish your scenario with help of Skyvia ( It is the cloud-based solution for no-coding integration, with wide functionality and flexible scheduling features.