You need to sign in to do that
Don't have an account?
sudhIr Narayan
Hi,
I am not able update opportunity SyncedQuoteId with quote Please suggest me some steps this is new method for me
Not able to update
Hi,
I am not able update opportunity SyncedQuoteId with quote Please suggest me some steps this is new method for me
trigger update_quote_id on Quote (after insert) { List <Quote> Qo= [ select id,opportunityid from quote where id = :Trigger.newMap.keySet()]; for ( Quote Qt : Qo) { if ( Qt.opportunityid <> null ) { list <opportunity> op = [select id,SyncedQuoteId from opportunity where id = :Qt.opportunityid]; for ( opportunity opp: op ) { opp.SyncedQuoteId = Qt.id; update opp; } } } }
Thanks
Sudhir
The SyncedQuoteId field cannot eb updated in a trigger. You have to instead do it in an apex class and call that apex class in the trigger. Please see this: http://blog.softwareallies.com/2010/08/salesfoce-syncing-quote-in-apex.html
If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.
Thanks,
Shashank