You need to sign in to do that
Don't have an account?

How to undelete Account having open opportunity ?
If any of the opportunities associated with Account has stage value is not "closed lost" then the Account cannot be deleted.
How to achieve this ?
How to achieve this ?
Please find the below Trigger that meets your requirements.
Kindly mark this solution as solved if it helps you.
Best Regards,
Onesh.K
All Answers
You can achieve this functionality by writing a trigger.Please find the below code snippet.
Note : 'o' is the instance of the object that is been used in your trigger.
Note: As a best practice dont write multiple triggers on the same object, still if you require you can make use of trigger context variable.
Kindly mark this solution as solved if it helps you.
Best Regards,
Nagendra.P
Please find the below Trigger that meets your requirements.
Kindly mark this solution as solved if it helps you.
Best Regards,
Onesh.K