I am writing an after update trigger on OpportunityLineItem that will update an opportunity based on values retrieved from it's respective line items.

By sheer accident, I forgot to include the update statement to commit the list of opportunities while testing, but the values seem to be being saved anyways.

I was just curious to how this was working-- since I would think the update DML statement would be required to alter anything.



  • 1
    Can't be. Are there any other triggers on same object that can be do the update? – highfive Apr 22 '14 at 17:49
  • Are there field update workflows on the object – Rao Apr 22 '14 at 17:50
  • or Roll up summary fields? Note that Opportunity.amount is implicitly a RSF on OpportunityLineItem - no action required by any trigger – cropredy Apr 22 '14 at 18:01

As others have stated, it's not possible in an after update. It is, however, possible to modify a record in a before update trigger without explicitly calling the update call. Check to see if you are specifying before update instead of or in addition to after update. Also check to see if the logic isn't replicated elsewhere in other triggers or workflow updates.

  • Yes, I think I must have duplicated the logic somewhere else and this is the reason why. Sorry about that! – James Apr 23 '14 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.