0

I have created a trigger that inserts a record into an object that has a master detail relationship to the Standard Order object. When this record is updated the products are updated as well as I use a Lookup Related Engine to extend the Roll Up Summary functionality (essentially stock control by decreasing a value in a custom field). This all works as expected. The order in question is already activated.

The problem is that our After Update Trigger of our Order Object is being executed and I can't determine why.

If I filter the debug log it states the following:

  • CODE_UNIT_STARTED Inventory Trigger AfterInsert
  • CODE_UNIT_FINISHED Inventory Trigger AfterInsert
  • CODE_UNIT_STARTED [EXTERNAL] Validation: Order: ID
  • CODE_UNIT_FINISHED Validation: Order: ID
  • CODE_UNIT_STARTED Order Trigger AfterInsert

It is the triggering of the Order AfterInsert I don't understand. I am also a little unsure as to the relevance/importance of the " EXTERNAL Validation" reference in the log.

I would like a bit better understanding of the execution order, my current best guess is the LR Engine is updating the products quantity field and this is causing the order to think it is updated (there are no triggers on the product object and the orderlineitem triggers aren't executed).

Thanks

0

I found the evidence I need to justify an answer.

Do changes to rollup summary fields cause triggers to fire?

If the record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure.

| improve this answer | |

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.