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
Suresh RaghuramSuresh Raghuram 

Validation rule to stop when a new record created when there already exist a record of same recordtype

Hi Community,

I have a requirtement where one opportunity should have only one case of one record type.

I tried to achieve this usinig a trigger by showing an error message, but I ran into a issue when the case record with same record type is adding from the opportunity with a javascript button. It is hitting this error but not showing and navigating to the home page.

Any Ideas please.

Thanks.
AshlekhAshlekh
Hi,

You can do this only by trigger and trigger should be written on Caes object on insert and update event.