• Devon Allary
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
I have an on-premise SQL Server application that I'm trying to connect to Salesforce. I'd like to be able to trigger updates to the SQL database from Salesforce - e.g. an opportunity is won and this sends a query to the database to create a new project record.

I've done this in the past using API's, but the SQL Server I'm using doesn't seem to have anything like that. What would be the best way - or third party software - to use to update a SQL database using Apex?

There's currently a connection set up between the two using DBAmp. If anyone has experience with that software, do you know if there's a way to call the methods programmatically from Apex?
Our company uses a project management tool to manage engagements after they've been won in Salesforce. I've set up an Apex callout that will request the status and other information on the engagement from the project management tool's API and will use that status to update Salesforce.

Each of the engagements needs its own separate API call. We might, at any given time, have thousands of open engagements and I need to update these every night.

I've set up a scheduable Apex class that runs a query to find all of the open engagements that are connected to the project management tool. Then, I just loop through the records and for each one I run the API call and update. This seemed to work in the testing phase, but now I have many more records and I'm getting a "Too many future calls: " error.

I was thinking about running a scheduled query beforehand and dividing all of the Salesforce engagements into groups of 50, then scheduling multiple updates of 50 records staggered by a couple of minutes. This doesn't seem like a very scalable, though. Does anyone know of a better way to do this?