Syncing quotes using Apex

Wondering how to sync quote with an opportunity using Apex? Did you tried updating the “IsSyncing” field and it showed an error saying field is not writable? If yes then here is the solution for you. At the Opportunity level you have a field named as “SyncedQuoteId” and if you update this field with the desired quote id, then salesforce automatically sync this quote with opportunity.

Opportunity.SyncedQuoteId = (desired);
update opportunity;

In the same way do you wanna sync your custom fields for quote and quote line item then here is the application from appexchange

Managed package

Unmanaged package

Happy Quoting !!!

This entry was posted in Apex, salesforce, Salesforce Tips & Tricks, Uncategorized and tagged , , , . Bookmark the permalink.

3 Responses to Syncing quotes using Apex

  1. Elly Bockley says:

    I tried doing this before I saw this. I got and error stating SyncedQuoteId is not writeable in a trigger. How did you not get this error?

    • Srini says:


      Can you post me your code, hope you are updating the SyncedQuoteId on Opportunity object?


      • Elly Bockley says:

        Quick question – did you do it in a trigger or a class. The error says the field is not writeable in a trigger. But I then found out it is writeable in a class.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s