I'm working on a Salesforce/Quickbooks integration for a Force.com application. I need for the app to autosync during the user's initial login to the customer portal. Throughout the session, the sync will be on-demand, triggered by changes to the database (insert, update, or delete operations) for relevant objects. The on-demand sync is straightforward. However, I'm having difficulty finding a way to automatically start the sync at the beginning of the session.

We're using custom visualforce pages.

Any ideas?

  • 1
    This thread help any? salesforce.stackexchange.com/questions/9926/… – Brian Jul 26 '13 at 17:14
  • @geeljire plz tell me the process of authorization for quickbook to salesforce integration by code example i'm facing problem when authenticating. – Tepsi Dec 2 '13 at 8:11
  • @Aisha I'm not sure I follow your request, developer.intuit.com and the sfdc oauth playground should come in handy. – geeljire Dec 3 '13 at 3:48

Getting creative, (thanks, @brianpeddle!), you could add a Visualforce page as a sidebar component, or set it as the default page for the default app - see this question and its answer: Execute an action / run a trigger every time a User logs in to Salesforce.

| improve this answer | |

I don't think you can launch a trigger based on somebody logging in so that means you'll need to use your controller to launch the sync. How about using a session cookie/variable for initial syncing? If the cookie indicates the initial sync has not happened then the controller launches the sync and updates the cookie. Otherwise the syncing only happens on-demand.

| improve this answer | |
  • Thanks Mike. If I could choose two good answers, I would. As it is, using a redirecting VF page is better for my needs, although each technique has its limitations. – geeljire Jul 26 '13 at 19:55

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.