Categories

Getting Started

Learn through 101 guides and easy solutions.

How to Prevent Lead Source From Being Overwritten in Salesforce

How to Prevent Lead Source From Being Overwritten in Salesforce

min. reading

In this blog, I’ll walk you through how to prevent a lead source from being overwritten in Salesforce and how to activate and test it.

Create a validation rule

To prevent lead source for being overwritten, create a validation rule in Salesforce. Navigate to the lead object > validation rules > new and enter the required information.

To run the validation rule if the lead source is changed and if the current value is not empty use this as your error condition formula.

	
ISCHANGED( LeadSource ) && (PRIORVALUE(LeadSource) <> "")

You might want to allow some users to update the lead source field. For example, a marketing manager might need to update this field to correct data. To run the validation rule if the lead source is changed, if the current value is not empty AND allow a particular user alias to bypass the validation rules, use this as your error condition formula.

ISCHANGED( LeadSource ) && (PRIORVALUE(LeadSource) <> "") && !($User.Alias = "JMolb" )

You can also bypass the validation rules by using the user role ID, like this:

ISCHANGED( LeadSource ) && (PRIORVALUE(LeadSource) <> "") && !($User.UserRoleId = "00E36000000EJ8m" )

Activate and test

Activate your validation rule and test it by updating the lead source for a lead that already has a value. You should see an error message when saving the record.

Do another test by creating a new lead. Fill out the lead source field to ensure that you have the ability to update the field.

Questions?

Send me a tweet @jennamolby, or contact the Sercante team for help.

Subscribe to The Spot

Hidden
Hidden
Hidden
Hidden
This field is for validation purposes and should be left unchanged.

Categories

Top 3 Recent Post

  • Jenna is a Marketing Operations leader with over 10 years of experience working with both enterprise organizations and start-ups. She started her career as a consultant, helping B2B and B2C clients get the most out of Marketo, Pardot, Marketing Cloud and Salesforce. She then moved in-house, working with B2B SaaS companies, helping them build their sales and marketing technology stacks and processes from scratch.

Leave Your Comment

Related Articles

Bot Single Post