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) Quote.id; 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
Happy Quoting !!!