• About
  • Contact me!

Salesforce Everywhere

~ Blog on Salesforce Dev and admin stuff

Salesforce Everywhere

Tag Archives: Restrict Lead Conversion

Block lead conversion unless Lead Status is Qualified

16 Monday Mar 2015

Posted by Mani in Point and Click, Salesforce Configuration

≈ 2 Comments

Tags

Lead Conversion validation, Restrict Lead Conversion

Requirement:

If Lead status is other than Qualified, don’t show Convert Button in Lead Page.

Solution:

Again, we want to achieve this functionality only through Configuration(Point and Click) and not through Visualforce/APEX.

Steps are as follows:

1. Create 2 Record types as “Non Qualified Lead” and “Qualified Lead” for a Lead object under Customize -> Leads -> Record Types. Screenshot is given as below.

Lead Record Type

2. “Non Qualified Lead” will be set as default for all the profiles under Manage users->Profiles as per the below screenshot and “Qualified Lead” will not visible to any profile.

Default Record type

3. Create 2 different Page Layouts, one with Convert button displayed and other one without Convert button.

4. Create two workflows as given below.

The first workflow updates the Lead record type from “Non Qualified Lead” to “Qualified Lead” when a lead status gets changed to Qualified.
Firstwf

Firstwfaction

The other workflow does vice versa.i.e. Change the Lead Record type to “Non Qualified Lead” when a Lead Status is not equal to Qualified.
Secondwf

Secondwfaction

If we had a requirement to restrict Lead Conversion(though show the Convert button in Lead Page) process by showing an error message when user clicks on Convert in Lead Conversion Page, we would have written the following Validation rule under Lead Object as given below:

AND( IsConverted, NOT( TEXT( PRIORVALUE(Status) ) = “Qualified”) )

IsConverted field returns true for a Converted Lead else return false.
PRIORVALUE returns the previous value of the field.

This Validation rule will throw an error as given in Error Message field, if the previous value of the field Status not equal to Qualified and IsConverted=True.

Validation Rule

Please share your comments/suggestions on this.

Advertisement

Blog Stats

  • 114,773 hits

Archives

Recent Posts: Salesforce Everywhere

How to get field values on onLoad in lightning-record-edit-form in LWC?

Using Dynamic Actions

How to check if the logged in user is a Guest user or not in APEX class?

How to Close Quick action in LWC

Lightning component to filter Products and display results in lightning data table

Connect with me

  • View @manibalan_s’s profile on Twitter
  • LinkedIn

Developer links

  • Salesforce Developer website
  • Salesforce Success Community

Enter your email address and click on Follow us (below) to follow this blog and receive notifications of new posts by email.

Website Powered by WordPress.com.

  • Follow Following
    • Salesforce Everywhere
    • Already have a WordPress.com account? Log in now.
    • Salesforce Everywhere
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar