• soMuchToLearn
  • 0 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 0

This is my first trigger and I only have an admin background so I’m stuck early on. I have Master Opportunities that have children opportunities off of them. If the master opportunity is marked Closed Lost then the Children all need to be updated to a stage of Closed Lost as well. I know in English what I want to do:


I Need an "After Update" trigger.  
I Need to take the id of the master Opportunity and use it to query for a list of child Opportunities.

I Need to Loop thru the children, to see if the Stage Value of the child is not “Closed Lost”.
If it is not “Closed Lost” I need to add each child to a list for updating.
Finally I need to update the Stage on the list of Children once I’ve checked all of them. 


I have a start...

trigger updateChildOpportunity on Opportunity (After update) {

and now I’m stuck :-(