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
Surbhi Dham 16Surbhi Dham 16 

validation rule on account record type

i need to write a validation rule on account where i want some specific profile to change the record type of the account if the account status is prospect. also, i want that rest of the  profiles should not be able to change the record type. please advise.
Vikash TiwaryVikash Tiwary
Rule Condition similar as below.

AND(ISPICKVAL('Status__c', 'Prospect'), IsChanged(RecordTypeId), $Profile.Name != 'System Admin', $Profile.Name != 'Finance')

In above scenario only admin and finace can change the recordtype no one else.
Surbhi Dham 16Surbhi Dham 16
Hi Vikash,

I have written the same but in this case finance profile can still change the record type of Active or Inactive accounts which i don't want. i want them to change only the record type if te status is prospect. this is not working in that case.
Surbhi Dham 16Surbhi Dham 16
Hi Vikash, I have written the below – AND ( ISPICKVAL(CA_Account_Status__c , "Prospect"), ISCHANGED(RecordTypeId), $Profile.Name != 'System Administrator', $Profile.Name != 'CA - Global Sales Ops Support' ) But in this case my Global Sales Ops can change the record type if the status is not prospect which I don’t want. Please advise. Thanks Surbhi
Vikash TiwaryVikash Tiwary
OR(AND ( ISPICKVAL(CA_Account_Status__c , "Prospect"), ISCHANGED(RecordTypeId), $Profile.Name != 'System Administrator', $Profile.Name != 'CA - Global Sales Ops Support' ), AND(NOT(ISPICKVAL(CA_Account_Status__c , "Prospect")),ISCHANGED(RecordTypeId)) This should work in your case. Please let me know by marking it as best answer if works.