#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.