+ Start a Discussion
Haseeb Ahmad 9Haseeb Ahmad 9 

how to stop creating case if opportunity already have one open case?


Case object have lookup relation to opportunity (OppToCase__c) what I want if an opportunity already has an open case with record type ('PS Only') related,  then don't let user create another case with that same record type.

How I will do that? any idea?  thank you
PriyaPriya (Salesforce Developers) 

Hi Haseeb,

You may try it with validation rules. Create a validation rule on child objcet with below formula:
If( OR( ISPICKVAL( <yourfieldname>, "open" ),

Please mark it as Best Answer so that it can help others in the future.


Priya Ranjan