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
Nico-ITWNico-ITW 

Validation on Case Close and Open Tasks

Hello,

 

Does anyone has an idea on this:

 

I would like to create some kind of validation on the Case Close event; a Case should only be able to be closed if there are not any open activities left.

All activities (tasks) have to be completed before a case can be closed.

 

I'm not quite sure if this is even possible, but perhaps someone has an idea on this.

 

Thank you very much for your information.

 

Regards,

 

Nico

MarkSilberMarkSilber
There isn't a way to do this using normal configuration (workflow, rollup summary, validation). You would need an Apex Trigger on the Case object that prevents the save by looking at related Activities or a trigger on Activities that updates a field on the related case that you can valdiate against.
Message Edited by Mark Silber on 07-21-2009 06:03 AM
EGA FuturaEGA Futura
Do you have the Apex code? :smileyhappy:
Nico-ITWNico-ITW
I'm afraid this functionality is not available in our Professional edition :smileysad:
MarkSilberMarkSilber
Sorry -- I don't have example code since this isn't something we do in any of our Salesforce orgs. I'm sure someone on the discussion boards could provide some code -- it won't be very complex.
Tami_MTami_M

I am looking for a simliar solution but cannot find any other references on community or other boards.  Does anyone have a solution for this?  To recap, we need a way to prevent a user from closing a case when there are open tasks on the case.