Wednesday, June 12, 2013

Syncing Salesforce 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.

App Exchange App's:
Custom Quote Sync (Managed)

Custom Quote Sync (Unmanaged)