function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BondicloudBondicloud 

Does anyone know the maximum number of characters that a SFDC variable name can have?

Does anyone know the maximum number of characters that a SFDC variable
name can have?

Best Answer chosen by Admin (Salesforce Developers) 
BondicloudBondicloud

Example for  integer = 255 chas as well as for class name length 40chars   like that .. 

 

is there any documentation pls provide the link.

All Answers

hitesh90hitesh90

Hi,

 

The Length of Number data type is 18 characters in salesforce .com


Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator
My Blog:- http://mrjavascript.blogspot.in/

BondicloudBondicloud

Example for  integer = 255 chas as well as for class name length 40chars   like that .. 

 

is there any documentation pls provide the link.

This was selected as the best answer
BondicloudBondicloud

Does anyone know the maximum number of characters that a salesforce variable
name can have?

hitesh90hitesh90

It Depends on datatype which you have selected.

 

Text - up to 255 characters

Text Area - up to 255 characters

Text Area (Long) - up to 32,768 characters

Text Area (Rich) - Up to 32,768 characters

sandeep@Salesforcesandeep@Salesforce

If It is Number Type then 18 characters ( including number of digits before and after decimal).

If It is TextType then then 255 Characters

if it is Class or variable name in apex then 40 characters

if it is report's Name then also 40 characters

Rick UptonRick Upton
In Lightning Flow, I created a variable with a Data Type of Boolean and a Unique Name that was 42 characters long. The flow wouldn't work and the flow error that was generated didn't give any indication as to why it didn't work. I noticed that when I was mapping the Input and Output fields of subflows with this variable, remapping this field behaved a little differently. So I took a guess that the Unique Name of the variable was too long. I shortened the Unique Name to 24 characters, and this fixed the problem.