How to limit the number of characters for an input field

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a requirement to limit how many characters can be allowed the user to input into a field.
Photo of Jaime

Jaime

  • 1,220 Points 1k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Jaime

Jaime

  • 1,220 Points 1k badge 2x thumb
for example the subject field on an event should only be 25 characters long.
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
You should be able to limit this in the salesforce field settings. I believe you can olso opt to override the meta data settings by clicking on the field in the model editor (not in a layout) and then define max chatacters for text fields
Photo of Karl Li

Karl Li, Employee

  • 708 Points 500 badge 2x thumb
Hi Jaime,

Raymond is correct. Here's how to do it in the metadata settings of a specific field, although I would say that it's generally best practice to change this on the Salesforce side first.



Sincerely,
Karl