Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hello and thank you for taking the time to read my question, this may be a really stupid question but I have been banging my head all morning into finding the answer. I looked at the Quote Schema as well as the Developer docs Quote Doc

I was not able to find a way to create the 'push' of the Sync button. As well when I try to change the checkbox to True in code

Quote testQuote = new Quote(
                        name= 'JFTestQuote',Agreement_Term__c = '12 Months', Payment_Terms__c = '1005 with Purchase Order',
                        OpportunityId = testOpp.Id, IsSyncing = TRUE

I get an error stating : Field is not writeable.

I need to have my quote as synced in order to test my trigger, as there may be many quotes in the opportunity but only the synced would be of importance.

Any thoughts? Thanks again!

share|improve this question
up vote 5 down vote accepted

Instead of marking the sync at the quote level you'll need to mark it at the opportunity level via the Opportunity.SyncedQuoteId field. After doing this the Quote.IsSyncing field will be true.

share|improve this answer
Thank you very much for this information Ralph. – jnoel10 Feb 19 '13 at 15:55
@jnoel10 happy to help, if that answered you're question could you accept my answer? – Ralph Callaway Feb 19 '13 at 15:56

This blog post ( explains what triggers the syncing to happen.

share|improve this answer
Thank you Mike, the blog had everything I was looking for. – jnoel10 Feb 19 '13 at 15:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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