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
4u4u 

validation rule on record type

1) for profile A record type of a contact cannot be changed from prospect to future 

 

 

2) for profile B record type of a contact cannot be changed from prospect to  future when there is a opportunity for that contact 

 

 

 

can any one help me with validation rules for the above two statements 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Madhan Raja MMadhan Raja M

1) for profile A record type of a contact cannot be changed from prospect to future

 

Try this formula:

 

AND( $Profile.Name ='Profile A' , PRIORVALUE(RecordTypeId) ='012900000008EmP', RecordTypeId = '012900000008EjL')

 

Replace 012900000008EmP with Prospect's record type id

Replace 012900000008EjL with Future's record type id

 

2) for profile B record type of a contact cannot be changed from prospect to  future when there is a opportunity for that contact 

 

 We cannot use Validation rule to check whether an opportunity is associated with a contact. Use trigger of this case.

 

Regards,

Madhan Raja M