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
Udaya BhaskarUdaya Bhaskar 

Validation rule needed on save& close

    Hi All,

I have a requirement where i should not allow to close case page on clicking save& close button on case page,if case type is Claim. Please let me know how to develop this validation. I tried writing validation rule and is not working.

Please reply to this soon as this is critical business req.

Regards,
Udaya
werewolfwerewolf
The validation rule should be like:

AND( $RecordType.Name = 'Claim',  IsClosed )

This won't make the Save & Close button go away, but it will keep people from closing records of the Claim record type, so if they try to Save & Close and then actually try to close the case they'll get an error.

Be sure to put a descriptive error message in there so that users know what's going on.  Otherwise they'll just get mad at you.
Udaya BhaskarUdaya Bhaskar
Hi,

Thanks a lot for the reply. But it is not working. I am not using any separate record type for claims. It is one of picklist values in the field Type on case object. When the Type is Claim, i should not allow the user to close the case by clicking save & close button.

Pls give some pointers on this at your leisure.

Regards,
Udaya
HardhatHardhat
Well, then instead of $Recordtype.Name = 'Claim', just do it on Type = 'Claim'.  Use the formula field editor in the validation rule page to help you decide how to create the formula and what fields to use.