function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tyler AtwellTyler Atwell 

How to update a contact field to reflect what stage an opportunity is in

I want to know what stage an opportunity that a contact is related to, on the contact record. What is the best way to do that.
Abdul KhatriAbdul Khatri
If understood correctly, you wanted to see the opportunity stage information on a contact record part of that opportunity.

Question, what if you have multiple opportunity for the same contact, which opportunity stage would you be interested to see.
Tyler AtwellTyler Atwell
Probably the one that is highest. Get Outlook for Android
Abdul KhatriAbdul Khatri
I guess Apex Trigger would be the best in this case as you will more control.
Tyler AtwellTyler Atwell
I'm not very well versed with Apex, do you know of anyone who has done something like this?
Abdul KhatriAbdul Khatri
What you mean by hightest? I will provide you the one if you can provide me some details.
Tyler AtwellTyler Atwell

So I'm trying to create a view of the Contact lifecycle, knowing when we are contacting and in an active opportunity. I plan on using Process Builder to update that field, but I need the opportunity stage to live on the contact record to make it easier. 

When I say heighest, I meant the opportunity that is furthest along. We have a naming stucture for our Opp Stages as follows, 

1 - Discovery
2 - Development
3 - Prove 
4 - Building 
5 - Close
6 - Win
7 - Loss
8 - RTM

So if there was some way to leverage the numbers on the front, that would be best.
 

But! I'm now just thinking that I really only want visability of if they're in an active opp or not for my purposes, while having the stage on the contact would be nice, I really could get buy with a checkbox knowing if they are related to ANY opportunity that is in Stages 1 through 5.​​​​​​​

Does that make sense?

Tyler AtwellTyler Atwell
Upon further thinking, I do actually need to have all stages, but honestly it might be possible if I were just able to have a field that concatenated the stages of all related opps together. I will be able to create filters off of that using contain/does not contain.