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
ChubbyChubby 

how to restrict closing one milestone without closing other milestone

Hi All,

Please help me with the below requirement.
I have parent object Opportunity and child object Milestones. Opportunity has two milestones M1 and M2 which has status field. I want to restrict changing the status to completed on M1 unless M2 is completed. Can wedo this through VR?
Any thoughts appreciated.
Thanks.
Sohan Raj GuptaSohan Raj Gupta
Hi Cubby,

You can restrict user to change status using Trigger.

In trigger you can get all open MileStone using Opportunity ID and if any MileStone is not marked as completed you can show error message on page.


Hope this will help you. Let me know if it helped or you need any more assistance. 

Please mark this is as the solution if it solved your purpose.

Thanks,
Sohan Raj Gupta