function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Syncing custom fields between quotes and opportunities

Hi There,


I have a custom required field on my opportunityLineItem. When I try to sync a quote it complains that the required field is missing. I've created the field in the quoteLineItem, but how do I link the two fields together for syncing?



Will MoxleyWill Moxley

You need to write trigger code to to that.  Let me see if I can dig up a sample.


That would be great thanks!


So it's not like Lead conversion where the fields are mapped in the UI then?


Hello Will Moxley:


Were you able to get a sample code for this functionality?  It seems few people are looking for a work-around.  Would anyone happen to know if SF plans to add this as standard functionality?  Or is it worth the while to write Apex code?  We still get into trouble because of the recursive functionality of the triggers.

Will MoxleyWill Moxley

As of right now it would be worth your time to invest in the APEX code.  I will post the sample code soon.


Thanks Will.


I am investigating how to code the Apex code myself.  One thing I've come upon is that there's no way to identify the Opportunity Line Item to its corresponding Quote Line Item.  For some reason, SF updates the correct record but according to the API, there's no way of knowing which one to update.  Another post recommended using Product codes, but even products may exist multiple times on one Opp.


Any suggestions on this?



Thx again.




 Here is an app that allows u to configure custom fields mapping between Opportunity and Quote, and custom fields on OpportunityLineItem and QuoteLineItem. The mapped fields will be synchronized automatically similar to the standard Quote Sync process.


thank you thank you thank you thank you thank you!!!

Amit Chaudhary 8Amit Chaudhary 8
I have created a blog for this issue Please check below link :-

Please like this post if above link is helpful 

Amit Chaudhary