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
Ragnar Lothbrok 7Ragnar Lothbrok 7 

How to make field dependent when case owner is changed and profile is of specific type?

Hello there,
I have a checkbox field named as "Reviewed Cases". I want to make this field dependent (checked) only when there is a change in case owner field and the newly selected owner is of specific profile like ("AST Incident", "AST Support").
So is there a way that we can achieve this with validation rule or with some other way would be really appreciated.
Thank You.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Ragnar,

Do you need Validation rule. do you want validation rule  to fire when the owner is changed and it may not not fire when other fields were fired. Can you confirm if you are okay with it.
 
AND(ISCHANGED(Ownerid), owner.user.Profile.Name !=‘AST Incident',owner.user.Profile.Name !=‘AST Support',Reviewed_Cases__c=True)



Thanks,


 
Ragnar Lothbrok 7Ragnar Lothbrok 7
Thanks Sai,
This senario is perfect for validation. But can you also help me if this same kind of senario will it be possible with the pop-up confirmation. Like when user change the owner of case then if the new owner is of specific profile then user will get pop-up confirmation dailog with ok and cancel button on Ok click the owner will change with the new one and on Cancel click the process will stop. Will that be possible? Can we achieve this one?