You need to sign in to do that
Don't have an account?
clay boss
Restricting Lead Conversion when pressing Convert
Hello,
I am running into trouble restricting lead conversion based on if certain fields are null.
I have the Industry field and a custom field Revenue Types on the lead object. Both of these are required fields. We also have leads coming in from the website, that are allowing leads to bypass this required field on the lead object in Salesforce.com.
Setting custom fields on the lead object that map to custom fields on the Account, Opportunities, and Contact objects, making them required, and mapping them via the User Interface seems like an overly complicated workaround for this.
I am wondering if there is a way via a trigger, or by other means, to make it so if users press "Convert" on the lead conversion process, it will give them an error if Industry and Revenue Types are null.
Setting validation rules on the Opportunity object itself doesn't seem to work for me in this, because this gets in the way of other processes that have previously been programmed.
Hopefully this makes sense.
Thanks for any information!
I am running into trouble restricting lead conversion based on if certain fields are null.
I have the Industry field and a custom field Revenue Types on the lead object. Both of these are required fields. We also have leads coming in from the website, that are allowing leads to bypass this required field on the lead object in Salesforce.com.
Setting custom fields on the lead object that map to custom fields on the Account, Opportunities, and Contact objects, making them required, and mapping them via the User Interface seems like an overly complicated workaround for this.
I am wondering if there is a way via a trigger, or by other means, to make it so if users press "Convert" on the lead conversion process, it will give them an error if Industry and Revenue Types are null.
Setting validation rules on the Opportunity object itself doesn't seem to work for me in this, because this gets in the way of other processes that have previously been programmed.
Hopefully this makes sense.
Thanks for any information!
http://simplysfdc.blogspot.com/2013/12/salesforce-lead-conversion-validation.html
Always better to go no code if it's an option, much easier to scale and deploy!
All Answers
http://simplysfdc.blogspot.com/2013/12/salesforce-lead-conversion-validation.html
Always better to go no code if it's an option, much easier to scale and deploy!
I l ooked so many places for the answer but didn't realize you enable that setting and then have the IsConverted option on other objects.
Thanks also to Boris for the trigger answer.
Thanks!
As always our company uses bypass rules. This especially helps when cleaning old records that lack fields that are now required.
Code notes
1. Build the error
2. If the error isn't null and the disable validation rule is off for this user, alert the user to enter in the missing data
3. If there's no error, go to the lead convert page. Note our leads are under accounts. The three acc* fields prepopulate the account so it reads "Attach to Existing." We've already created accounts for all target customers (once again, working in the government space, so we just got a list of govts)