0

I'm looking to update the opportunity stage based on a field in a related list.

My opportunity is linked to the school, and the opportunity has a related list of teachers. We often have several teachers in one opportunity, some of them are using the product and some are not. I created a field in the related list which is the same as the stage in the opportunity (interest, reviewing, high interest, won, lost, etc.).

Now, I am looking to have the stage in the opportunity update equal to the related list with the highest stage. So if there is only one person reviewing then the Opp stage says reviewing. If there is one person we won, and one person interested, the opp stage says won.

Is there a way to do this without APEX? I'm beginning to think I should just make the Opp stage a check box that validates true whenever one of the related lists is won. It might be easier, but we lose information.

4
  • 1
    I would do it in Apex BUT you may be able to do it will roll up summary fields?? Based on the MAX value. IE assign each stage on the teachers related list a value. When the stage is changed stamp the Value on the record. Then use a roll up summary field on the opportunity to get the MAX value (as your only interested in the highest stage). Then workflows on the opportunity to say if the opportunity roll up summary field is: 1 its Interest, if 2 = reviewing, if 3 = high interest etc all the way up to 9 lost. Maybe?!
    – Francis
    Commented Sep 5, 2014 at 20:08
  • Are the related list objects part of a master-detail relationship with the Opportunity? If not then roll-up summary fields won't work.
    – Doug Ayers
    Commented Sep 5, 2014 at 20:51
  • 1
    @Doug you can always install Andy fawcetts free roll up summary field helper app, does the same thing on any field.
    – Francis
    Commented Sep 5, 2014 at 22:02
  • @francis, I think you should post your comment as the 'answer' so it can get marked as such. I agree completely and was going to post that as answer til I saw you best me to the punch :)
    – Doug Ayers
    Commented Sep 7, 2014 at 2:50

1 Answer 1

1

I would do it in Apex BUT you may be able to do it will roll up summary fields?? Based on the MAX value. IE assign each stage on the teachers related list a value. When the stage is changed stamp the Value on the record. Then use a roll up summary field on the opportunity to get the MAX value (as your only interested in the highest stage). Then workflows on the opportunity to say if the opportunity roll up summary field is: 1 its Interest, if 2 = reviewing, if 3 = high interest etc all the way up to 9 lost.

2
  • Whenever I create a workflow and field update and select the Opportunity Stage field my only options are not very helpful. I can either increase the stage, decrease the stage, or set it to something specific. No way to make it change based on a particular field. I would have to use 6 separate workflows to make this work. Commented Sep 7, 2014 at 19:15
  • Yes its not ideal. An alternative way would be to use "Headless flows". I don't think its quite released yet but is in pilot so you can request to have it enabled. Thats really the only other way to do it unless you go for code or the workflow route.
    – Francis
    Commented Sep 7, 2014 at 21:38

You must log in to answer this question.

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