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
ascarl2ascarl2 

Adding fields to Standard Buttons or Links

Is it possible to add fields on a page from a standard button (convert page)?  What i'm trying to do is add two fields on the page that displays after I click "Convert" from the lead page layout.  Our problem is we have two fields on the account page that are required but the reps aren't required to fill them out unless they edit the account page... I'm wanting to avoid adding these required fields to the lead layout because they may not know then answer until right before they want to convert them into contacts. 

I tried to Override the Convert button but its over my head...

Any ideas, solutions or best practices?? 
HarmpieHarmpie
I would say you picked the right direction : overriding the convert lead button. Of course this would involve rebuilding the entire screen for Lead conversion as well, which would allow you to add the 2 fields. It´s possible, but I think it´s a lot simpler and time-efficient to simply add the fields to the Lead object as well.
TCAdminTCAdmin
Hello ascarl2,

Harmpie is correct and either overriding the standard button or creating a new button to do this would be your best option. The bad part is that this isn't the easiest thing to do and does require knowledge of HTML if you don't need it to look like Salesforce or HTML & CSS if you do want it to look like Salesforce. The good part of this is that you can do much more with the conversion process if you need to. This can include moving values from Lead field to multiple fields on the Account/Contact/Opportunities. This level of customization can be great if needed. Let me know if you would be interested in having something like this built.
geekwannabegeekwannabe

We had a similar situation.  Our Opportunity fields have particular Naming Convention and additional fields that are required.  We noticed that during lead conversion some of the records were were not completed properly. I looked for a help to change the default to "not creating an opportunity" so that the reps could purposedly create them.  Here is what I found an it worked:

 

To automatically select the "Do not create a new opportunity upon conversion" checkbox on the lead conversion screen, create a custom button and use that button instead of the

standard convert button on the Lead page layout. To do this follow these steps:

1. Click on Setup | Customize | Leads | Buttons and Links

2. In the "Custom Buttons and Links" section, click on "New"

3. Assign a name and label to that button. It would be best to have the label set to "Convert"

4. Choose "Detail Page Button" in the "Display Type" field

5. Choose "Display in existing window without sidebar or header" in the "Behaviour" field

6. Choose "URL" in the "Content Source" field

7. In the code section type the following: "/lead/leadconvert.jsp?retURL=%2F{!Lead.Id}&id={!Lead.Id}&nooppti=1"

Now simply remove the standard "Convert" button and add this new button on the lead page layouts in the Detail Buttons Section where you would like this to take effect.

Now they have to choose to create an Opportunity.  At that point the fields that are required will be filled out. 
 
Hope this helps.
mfardellamfardella
Just wanted to let you know this saved me a whole lot of work and am very appreciative of your contribution.  At first I didn't think it would work because we have different lead record types but since you adjust the buttons on the page layouts and each record type has a different layout it worked like a charm.  Thanks again.