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
sivadevsivadev 

Validation Rule Question

I am trying to make a validation rule that will accomplish the following, but can't get my head around the logic.

I need for case object contact name (standard filed, look up to contact) and contact name2 (custom Object Contact-name__c , look up to contact )
if contact name or contact name2 contains "S.D".(S.Dis only a temporary holding name, user should change name while working on case ) now need rule while closing Case (resolved Case cannot be resolved when the Contact Name or the Contact Name2 is: " S.D"

There should able to close case while the contact name or contact name 2 is sd 
Need how can we filter on look up filed any aynatx help full please 
 Any help is appreciated. 
Sonam_SFDCSonam_SFDC
Hi Siva,

If I understand your issue correctly - you want user to be able to close a case only when both the contacts have same values as when the case was created.

A way to do this could be by creating two fields that are not visible in the pagelayout but store the initial value of the contact fields(contact name, contact name2)(using workflow) and when the case is being closed you can compare the values of contact fields with the hidden fields and see if the case can be closed or not.