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
Max WellMax Well 

I want to create a validation rule to assign the lead to the active user before editing the lead.

We haver a requirement that initially through web to lead the lead will be assigned to the Bucket like USA/Europe etc. We want that it should be assigned to the active user before it is edited by anyone. I have the validation formula which is working fine:

LEFT( OwnerId , 3 ) <> "005"

The problem with this is that I am unable to create the lead (web to lead) as it is throwing the error that plz assign the lead to the active user. I want my validation rule to run only if it is edited not at the time of creating.

Please help me!

Thanks,
Max
GauravGargGauravGarg
Hi Max,

Please max, please use "IsNew()" method in validation rule to verify that the record is not new. Like below:
 
Not(isNew())

Hope this helps!!1

Thanks,
Gaurav​
Max WellMax Well
Hi Gaurav,

Thank you for replying!

Is that possible for you to give me full validation formula. As I am getting error if I am adding the ISNEW() in my current formula.

Appreciate your help.

Thanks
GauravGargGauravGarg
Hi Max,

It would be beneficial if you could provide your formula, I will modify the same.

Thanks,
Gaurav
Skype: gaurav62990
Max WellMax Well
Not(isNew()
LEFT( OwnerId , 3 ) <> "005"

TIA Gaurav
Max WellMax Well
Not(isNew())
LEFT( OwnerId , 3 ) <> "005"
GauravGargGauravGarg
Hi Monika,

Please try this one, it works in my org. 
 
AND( 
Not(isNew()), 
LEFT(OwnerId , 3) <> "005")

Thanks,
Gaurav​