• Deepti Maheshwari 3
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am trying to do a one way sync from Quote to opportunity(Line Items included, standard and custom fields also). I have created triggers on opportunity and opportunity line item for the same. When 'Sync Quote' button is clicked from quote page it calls opportunity trigger and in the background quote trigger is called. In opportunity trigger I update line items also which then gives and error

Apex trigger IS_OpportunityTrigger caused an unexpected exception, contact your administrator: IS_OpportunityTrigger: execution of BeforeUpdate

caused by: System.DmlException: Update failed. First exception on row 0 with id 00kq0000002du0uAAA; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = 006q0000005Lw5i) is currently in trigger IS_OpportunityTrigger, therefore it cannot recursively update itself: []: Class.IS_OpportunityTriggerHandler.syncQuoteAndOpportunityCustomFields: line 302, column 1

I want to know in what order triggers are called on opportunity, opportunity Line items, quote and quoteLineItems? I have also observed that sometimes line items are deleted and new ones created and sometimes it updates the existing line item. How does salesforce determine which action has to be performed in this sync process?
I am trying to do a one way sync from Quote to opportunity(Line Items included, standard and custom fields also). I have created triggers on opportunity and opportunity line item for the same. When 'Sync Quote' button is clicked from quote page it calls opportunity trigger and in the background quote trigger is called. In opportunity trigger I update line items also which then gives and error

Apex trigger IS_OpportunityTrigger caused an unexpected exception, contact your administrator: IS_OpportunityTrigger: execution of BeforeUpdate

caused by: System.DmlException: Update failed. First exception on row 0 with id 00kq0000002du0uAAA; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = 006q0000005Lw5i) is currently in trigger IS_OpportunityTrigger, therefore it cannot recursively update itself: []: Class.IS_OpportunityTriggerHandler.syncQuoteAndOpportunityCustomFields: line 302, column 1

I want to know in what order triggers are called on opportunity, opportunity Line items, quote and quoteLineItems? I have also observed that sometimes line items are deleted and new ones created and sometimes it updates the existing line item. How does salesforce determine which action has to be performed in this sync process?