Re-Creating (linkable) Record Name Fields for Custom Use

Requirement: Standardize Opportunity Naming convention using a concatenation of Account Code plus Opportunity Number plus ‘Custom Opp Name’. This will standardize naming conventions across all corporate tools and assist in document searching.


  • Account: ABC Genius Tech Consulting
  • Account Code: ABCGTC
  • Number of Opportunities: 4 total
  • New Opportunity: Lots of Really Cool Widgets
  • So when this new Opp is created, the new Custom NAME should display:
    • ABCGTC-5-Lots of Really Cool Widgets 
      • (and be a clickable link to the Opportunity record)


  • Users still need to be able to edit the Standard Opportunity Name field but we don’t want people editing the abbreviation or number
  • Should replace the Standard Opp Name field in list views and reports with new Concatenated Name
  • New field needs to still be a link to record so users can click through in reports and list views
  • Opportunity Number should be sequential to the Account (Account A has Opps 1,2,3,etc; Account B has Opps 1,2,3,etc.)


  1. On Accounts:
    • Create Account Code text field on account records. Set to require unique values. Account_Code__c
    • Load in Account Codes
    • Create Rollup Summary field on account records to Count the Number of Opportunities for Opp Numbering
  2. On Opportunities
    • Create Opportunity Number field OppNum__c
    • Create Process that fires every time an Opportunity is created to take the Count of Opportunities from the related Account, add 1 and stamp the new Opportunity Number field
    • Create formula field to setup your new NAME field
      • Display Text
      • Create your Concatenated Name:
        • Account.Account_Code__c & “” & Text(OppNum__c) & “” & Name
      • Encase the above with the Hyperlink function to display as a link

Replace the Opportunity Name field with your new NAME field in reports and list views. Another cool bonus is the link always opens in a new tab so you don’t lose your place on your report or list view!

With this new field, our Reps can easily update the Opportunity Name as usual, but our Analytics maintain the structure using the Account Code and Numbering System. We made a decision upon turning this on to let all existing Opportunity records show 0 in the new OppNum__c field with new Opportunities showing the actual count. At some point in the future we may go back and number those old opps, but that’s for another day!

About Nana

Mom. Salesforce Architect. Runner. Artist. Writer. I am a Salesforce MVP Hall of Fame member. For more information on the Salesforce MVP community, visit: . Salesforce, Force,, Chatter, and others are trademarks of, inc. and are used here with permission.
This entry was posted in Salesforce Queen and tagged , , . Bookmark the permalink.

Let me know what you are thinking right here. Come on, do it. You know you want to!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s