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
jsacpt24jsacpt24 

update formula dependent on related list values

Hello. Wondering if someone might be able to help me figure this out.
I am trying to update our picklist Account.Customer_Type__c to either “Former Client”, “Current Client” or “Prospect”. This is updated through opportunities (which we have a related list set up as we can have many opps tied to one account). These opportunities then have Campaign_Design_Profile__c associated with them. We are wanting to have the account update as long as all the CDP’s are marked to “Complete” and all opps stage are “Closed Won”.
 
Former Client on Account –
AND(
ISPICKVAL(Opportunity.StageName = “Closed Won”),
ISPICKVAL(Campaign_Design_Profile__c.CDP_Status__c, “Completed”),
All opps are classified as Former 120+ days.
 
**If any opps are closed won -120 days then it would move back to Current Client**
Issue that I am running into is a way to pull all of the data from the related list to one opportunity. For example, I feel that if I can pull all of the data into the Opportunity from the CDP’s then we can update the boolean we have on the opportunity. Then with that same logic we can do that with the opportunities for the account. As in if the CDP’s all show as complete then we would have the opportunity Boolean show as true for former opportunity.