Salesforce API Name Character Limits for Different Metadata Types

#1MinuteTip While working on a recent project, I was defining the technical/design standards and best practices for the Salesforce Implementation. As a part of this exercise, I was defining the naming convention for different metadata types and wanted to list the maximum characters allowed in the API Names of different metadata types.

Strangely, I couldn’t find any Salesforce reference document on the same. So just figured it out myself. There are three main limits on the length of the API Name for Metadata in Salesforce. 40 characters, 80 characters & 255 characters.

Here is the maximum number of characters you can use in the API Name of the metadata type in Salesforce. This can be helpful when coming up with a naming convention for your Salesforce implementation. Please also note that:

  • This excludes the suffix added by Salesforce (e.g. ‘__c’ for custom objects and fields)
  • This list does not include all the metadata. But all the important ones are covered here. If I have missed out anything important do mention that in the comment below and I will add it to the list.
Salesforce API Name Character Limits

2 thoughts on “Salesforce API Name Character Limits for Different Metadata Types”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass