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
Lakshmi SLakshmi S 

How to Update Account status from Opportunity based on Contract Expiration Date?

Hi Team,

Requirement: Update Account status from Opportunity based on Contract Expiration Date.
1. Contract expiration date >Today - need to update Status=Active.
2. Suppose we have 10 opportunities to an Account, If any one of the opportunity contract expiration date > Today, need to update Account Status=Active else Expired.
Please advise how can we achieve this requirement?

Thanks,
Lakshmi S.
Khushmeet KaurKhushmeet Kaur
Hi Lakshmi S,

You can achieve the functionality via Process Builder i.e On Contract if this doesn't work you will have to write a trigger on Contract i.e After Insert Or After Update.
Please let me know if any assistance required

Thanks
Lakshmi SLakshmi S
Hi Khushmeet Kaur,

We are not using Contract object, we have a field in Opportunity based on that field we need to update Account Status.
Thanks for your response!!!
Khushmeet KaurKhushmeet Kaur
Hi Lakshmi S,

As the process builder can help to fulfil your requirement.

Thanks
Lakshmi SLakshmi S
Hi Khushmeet Kaur,

Not possible using Process builder. (Because One Account have more than one opportunties, So we need to check all opportunities contract date related to that account)
Thanks
Khushmeet KaurKhushmeet Kaur
Hi Lakshmi S,
Yes as create a process builder on the opportunity.
If this doesn't work you can go for the trigger, but it will only work for future records.

Thanks