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
dietcoladietcola 

how to set requirements before lead is converted

Hi, All-

 

I've actually posed this question to Salesforce Help Desk before, but they didn't quite give me the solution I was looking for.  I'm hoping one of you has a creative solution:

 

 

I'm looking for a way to make certain fields required before converting a lead but not required before saving that lead record.  Does anyone know a way to do this?

 

 

I'm thinking something can be done with a lead validation rule, but I haven't found a solution yet.

 

Thank you so much!

Best Answer chosen by Admin (Salesforce Developers) 
ron_reedron_reed
I think you can accomplish a workaround using record types.  The default record type would have a page layout that doesn't have those fields required but also doesn't have the convert lead button.  When the necessary fields are filled out, use a workflow + field update to change to a secondary record type with the convert lead button available.  Thus, that button will only be available if those fields have been populated.  Make sense?

All Answers

ron_reedron_reed
I think you can accomplish a workaround using record types.  The default record type would have a page layout that doesn't have those fields required but also doesn't have the convert lead button.  When the necessary fields are filled out, use a workflow + field update to change to a secondary record type with the convert lead button available.  Thus, that button will only be available if those fields have been populated.  Make sense?
This was selected as the best answer
dietcoladietcola

That definitely makes sense, and it strikes me as pretty brilliant!  I'll see what I can do to implement it (never created a field update that changes record type before, but I'll see what I can do) and keep you "posted."  (Bad pun.)

 

Thanks so much!

dietcoladietcola

Hmm, not sure I can use a Field Update for this.  I don't see a place to change Record Types in the space that allows you to create a new Field Update--I only see a place to choose which field to update, and unfortunately, I don't want to update any of the fields; I essentially want to update the record type.

 

Does that make sense, the way I explained it?  Any other thoughts?

 

Thank you!

ron_reedron_reed
Do you have any record types defined yet?  I think you have to set up a couple of record types before that field shows up in the list.
dietcoladietcola

Yes, I do have two record types defined.

 

When you say "before that field shows up in the list," which field do you mean?  I don't think it's actually a field that I want to update, right?

 

Let me know if I'm misunderstanding.  Thanks!

ron_reedron_reed
Yes, the field should be called Lead Record Type, or Record Type  I'm currently not able to access our sandbox, so it's hard for me to test it out right now.
dietcoladietcola

Sorry for the delay, the server that hosts our sandbox was apparently down.

 

Record type is an option!  Awesome.  I'll keep playing with this tomorrow.

 

Thank you again!

ron_reedron_reed
Awesome, I'm excited to hear how it turns out.  We have the same type of issue on our end, and I've spent a little bit of time searching around to see how other people have handled it.  Unfortunately, none of them meet all of our requirements without doing a lot of coding.   Hopefully we'll see some standard functionality added in the future to address the issue.
dietcoladietcola

Ran into the snag that even though I create a new record in my new record type (let's call this Record Type A--the one that does not have a Convert button), as soon as I save the record, it becomes my original record type (let's say Record Type B--the one that does have a Convert button.)  I tried deactivating my new Workflow rule completely, but I'm still having the same problem.

 

Will continue messing with it.

dietcoladietcola
Oh gosh, scratch that.  Okay, continuing with the correct page layouts assigned to the correct record types now...
dietcoladietcola

It worked!!  Thank you so much--I never knew that was possible and never would have thought of that!

 

Fantastic workaround.

ron_reedron_reed
great to hear! i've learned so much from these boards that i'm glad to be able to return the favor :smileyhappy: