Print this page

Specify Opportunity Name on Lead Object before Lead Conversion

Knowledge Article Number 000220247
Description Is it possible to specify opportunity name on lead object itself rather than doing it at the time of conversion?
Resolution It is recommended to do the testing in a Sandbox and developer environment.

STEP 1: Create a Custom Field on lead object so that users can enter the value they want to appear within “Opportunity Name” field on Opportunity Object
1. Click on your Name | Setup | Customize | Leads | Fields
2. Click on ‘New’ under ‘Lead Custom Field and Relationships
3. Select the Data Type as ‘Text’ and click next. Length can be anything depending on your business requirement.
4. Select the visibility of this field for various profiles. It is recommended that you DO NOT make it read only. Else, you would have to create another workflow rule to add value in the same.
5. Add it to the Page Layout you want it to be visible and click Save.

STEP 2: Create a Custom Field on Opportunity object which will be mapped to the Lead Custom field we created in Step 1.
1. Click on your Name | Setup | Customize | Opportunities | Fields.
2. Click ‘New’ on the ‘Opportunity Custom Fields & Relationships’.
3. Select the Data Type as ‘Text’ and click ‘Next’. Ensure that the character length is the same as you assign to the lead custom field created in Step 1 and click next.
4. Select the visibility of this field for various profiles. It is recommended that you DO NOT make it read only. Else, you would have to create another workflow rule to add value in the same.
5. Add it to the Page Layout you want it to be visible and click Save.

STEP 3: Map both the custom fields created in Step 1 and 2 above
1. Click on your Name | Setup | Customize | Leads | Fields
2. Under ‘Lead Custom Fields & Relationships’ click ‘Map Lead Fields’
3. Map the Lead Custom field you created in Step 1 with the Custom Opportunity Field you created in Step 2.
4. Now click Save.

STEP 4: Create a workflow rule to fill the same value in Standard Opportunity Name as you have in custom Opportunity Name which came when the lead was converted into Opportunity.
1. Click on your Name | Setup | App Setup | Create | Workflow & Approvals | Workflow Rules
2. Click ‘New Rule’ and Select ‘Opportunity’ from the list of objects.
3. Define a ‘Rule Name’ and give Description.
4. Select the ‘Evaluation Criteria’ as ‘Created’
5. Under ‘Rule Criteria’ select ‘Formula Evaluates to True’
6. Type ‘True’ within the Rule Criteria
7. Click Save and Next.

Now we will add a Field Update on this Rule to update the value in Standard Opportunity Name
1. Under ‘Immediate Workflow Actions’, click on ‘Add Workflow Action’ drop down
2. Select ‘New Field Update’
3. Define its Name, Unique Name, Description (Optional)
4. Within ‘Field to update’ select the Standard Opportunity Name field
5. Check the box ‘Re-evaluate workflow rules after field change’
6. Under ‘Specify New Field Value’ select the option ‘Use a formula to set the new value’
7. Click on ‘Show Formula Editor’
8. Select ‘Insert Field’ tab and locate the custom Opportunity Name field you created in Step 2. Click ‘Insert’
9. Click Save, then Done and Activate the workflow rule

After following these steps, you would not have to define the Opportunity name while converting the Lead. The same should be done on the Lead Record before it is converted. 

NOTE: In order to ensure that the workflow rule triggers when the lead gets converted, please ensure that your Org has “Use APEX Lead Convert” permission enabled. If not, please contact Salesforce Support for assistance.

Once this permission is enabled, please ensure “Require Validation for Converted Leads” is enabled on Lead Settings. If this is not done, the workflow rule would not trigger while the lead is getting generated.




promote demote