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
Vijay_sfnerdVijay_sfnerd 

Close case if already an open case existing on billing account

 Hi,
I have a custom billing_account__c object on which we can create cases of particular record type.
I am giving case creation function through a custom button.
Here is the challenge am trying to solve.
If there is a open case already existing on billing_account__c on that record type, I would like to close new case and if does not
Exist I will go ahead and create a case.
I am trying this using triggers but since new could not find a way.
Can someone help with this!?
Regards 
Vijay
ashishashish
Hi,
you can try to create a Custom field.that stores the CaseType+RecordId and then applying a workflow rule on creation to give a check if any case already exist with the same name.
thanks