Hi Trailblazers
I had a client who was not happy with the hyphen (-) which Salesforce automatically appends to an opportunity during lead conversion.
Something small but it could prove to be useful on your many trails.
Follow the steps to remove the hyphen (-) automatically from the Opportunities Name upon Lead conversion.
Example: LEAD NAME (THE COMPANY INC) CONVERTED TO OPPORTUNITY (THE COMPANY INC- )
This is standard Salesforce functionality. By default, Salesforce allows Users to add the name which starts with Account Name -. So they can edit that name and use some other name. Generally, people use Account Name-Opportunity Name.
This can be accomplished by using a workflow rule, with field updates based on a formula that checks for hyphen:
Create a workflow rule to remove hyphens from the Opportunity Name when an Opportunity is created:
- Classic: Go to Setup | Workflow Rules | Click New Rule or Lightning Experience: Gear Icon | Search for Workflow Rules | Click New Rule
- Select the Object as Opportunity
- Enter Rule Name
- Choose to evaluate the rule when a record is: created
- Then select the Rule Criteria as: formula evaluates to true.
Use Rule:
IF
(
CONTAINS(Name,'-'),true,false
)
- Click Save and Next
- Add Workflow Action to update New Field
- On the Field Update Edit page, enter a Name for the field update, and select Opportunity Name as the Field to Update.
- Specify New Field Value as below:
SUBSTITUTE( Name , '-', '')
- Activate the workflow rule.