Print this page

Remove hyphen (-) automatically from Opportunities name on Lead conversion

Knowledge Article Number 000193659
Description User wants to remove the hyphen (-) automatically from Opportunities name on Lead conversion.
Example: LEAD NAME (THE COMPANY INC) CONVERTED TO OPPORTUNITY (THE COMPANY INC- )
 
Resolution

It is Standard Salesforce functionality. 
By default the Salesforce allows you to add the name which starts with Account Name -. So that user can edit that name and use some other name (Generally people use Account Name-Opportunity Name).

Resolution: 
Create a workflow rule so that opportunity name doesn't have “-" on lead conversion. 

1.From Set Up | Create | Workflow | Workflow Rules | Click New Rule 
2. Select the Object as Opportunity.
3. Enter Rule Name.
4.Then select the Rule Criteria as formula evaluates to true. 

Use Rule: 

IF 

CONTAINS(Name,'-'),true,false 


5.Click Save and Next. 
6.Add Workflow Action to update New Field.
4.On Field Update Edit page Enter Name-Select Opportunity Name as the Field to Update. 
5.Specify New Field Value as below: 

SUBSTITUTE( Name , '-', '') 

6.Activate the Workflow Rule. 





promote demote