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

Salesforce Field Data entry

I have the following queries regarding entering values in SFDC fields:
1. Can we make a field such that whatever data is entered in the field is saved in UPPERCASE?
2. How to restrict entry of special characters in a field?
If someone has got an idea to achieve this, please share.

Hi SudipT


Please find the solution to your questions below

  1. You can write an APEX Trigger for the before insert and before update event to convert the text field value to upper case before saving in to SFDC data base.
  • You can easily restrict entry of any special character in any field by only writing a simple validation rule against the object.
  • Thanks and Regards,

    Dinesh Nasipuri

    Thanks for the quick reply.
    As for restricting the special characters in a field, I wanted that in the particular field the user is able to enter only alphabets and numerals and no special characters, instead of throwing an error by writing a validation rule.
    Let me know if we can do that?