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
Gabriel MocelinGabriel Mocelin 

Validation Rule on Convertion Lead Page

Hi,

I'm trying to create a validation rule that is triggered when the lead is converted, as you can see in the image below, but I'm having problems, the rule is: if the conversion button is triggered, it will check if the record owner (as it is highlighted in the image) is a specific type of user profile. But  is returning the error message when she should accept it, and I am not even able to get the debug logs.

Thats my Validation Rule:
AND(
ISCHANGED(IsConverted),
Owner:User.ProfileId <> '00e1U000000w4OK'
)

User-added imageObs. Record Owner = Proprietário do Registro(in Portuguese)
 
VinayVinay (Salesforce Developers) 
Hi Gabriel,

Try below snippet.
AND(
ISCHANGED(IsConverted),
Owner:User.Profile.Id <> '00e1U000000w4OK'
)

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
Gabriel MocelinGabriel Mocelin
Hi Vinay,

I tried, but i get the same error.

thanks for your help anyway
VinayVinay (Salesforce Developers) 
Hi Gabriel,

Can you explain more of your requirement and when should validation trigger?

Thanks,
Vinay Kumar
Gabriel MocelinGabriel Mocelin

Currently, our employee who receives or leads through the lead assignment rule is called "SDR".

The "SDR" (has a specific profile) performs the whole process and when he is going to convert this Lead he sends it to an "SDR Consultant" employee (another profile, which is the ID that is in the rule I posted earlier).

I want the lead to be converted only if an "SDR Consultant" is selected as the record owner at the time of the conversion (as shown in the image)