I have Project object(child) and Opportunity object (parent). I am writing a workflow where if the opportunity is marked as closed then mark project as closed and send email to project manager. So can you suggest best approach how can I check opportunity value if i do not have opportunity status field present in Project object.

1 Answer 1


Nilesh, Because the event that triggers this automation is actually an edit to the Opportunity, then the workflow would need to be an Opportunity workflow rule.

That said, I would strongly suggest using Process Builder to accomplish this. Using Process Builder, you can add an Opportunity process and, when conditions are met, push a field update through to that Opportunity's child Project objects. The steps would look like this:

  1. open Process Builder in Setup
  2. If you do not already have an Opportunity Process, select "New" in the upper right-hand corner.
  3. Name your Process and indicate The process starts when "A record changes"
  4. In your new Process, click the rectangle labeled "+ Add Object"
  5. Type "Opportunity" into the Find an object window, and select the Opportunity object.
  6. click the "when a record is created or edited" bullet
  7. click "Save" at the bottom
  8. now click the diamond labeled "+ Add Criteria"
  9. name the new Criteria something descriptive, like "Opportunity is closed"
  10. under "Set Conditions" select the Opportunity Stage field, and then choose the desired Closed value from the "Value" dropdown
  11. expand "Advanced" and check the "Yes" checkbox. This means it will only run once, when the Opportunity is closed, not at every other subsequent edit.
  12. Click "Save" at the bottom
  13. Under "Immediate Actions" beside the diamond we've just created, click "+ Add Action"
  14. under "Action Type" select "Update Records"
  15. Name the action something descriptive like "Mark child projects closed"
  16. under "Record Type" click the input field
  17. a screen will pop-up. Click the second option: "Select a record related to the Opportunity"
  18. in the filter list that appears, type "project", and you should see a child relationship displayed, called something like "Projects__r". Select this option.
  19. Click "Choose"
  20. Use the new "Field" dropdown to select your Project status field, then choose the desired Closed option under "Value"
  21. Click "Save" at the bottom
  22. Click "Activate" in the upper right hand corner. This will make your new Process automation active.
  23. Test the automation by moving a test Opportunity, which possesses at least 1 child Project, to the desired "Closed" stage.
  24. Verify that the Opportunity's child Project(s) have also been marked closed.

I'll let you figure out how to add an email alert on your own, but I also strongly recommend you go through the Process Builder Trail over at Trailhead

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .