below is the screen shot which is highlighting the number field format , so i need to remove the space EX :2342355435 , not like this format 2 342 355 435
2 Answers
Just change your field type to text. Number fields are automatically displayed in the user's locale. These type of fields are not suitable for unformatted numeric data.
-
-
1@Prasanth you can enforce that by a validation rule. If you don't want the thousands separator, it needs to be text.– sfdcfox ♦Commented Dec 7, 2017 at 4:22
You have two options here
First create a new formula field and formula TEXT
and you will get unformatted value.
Second use trigger and remove space using string function deleteWhitespace()
and it will remove all space.
-
The second option won't work... This is a number field, so it's formatted per the user's locale.– sfdcfox ♦Commented Dec 6, 2017 at 21:08
-
Thank you Tushar Sharma, i will try second option, if work's then will mark it other's wise i will ask for help.– PrasanthCommented Dec 7, 2017 at 4:05
-
@sfdcfox I think second option will work might need some work. Because SF format the text on UI (maybe using JavaScript) and in trigger we can easily remove the formatting. I have tried this on Phone number and it works well. Commented Dec 7, 2017 at 4:51
-
1Thank you Tushar Sharma, i am thinking to change data type text and writing validation rule to enter only digits in field.– PrasanthCommented Dec 7, 2017 at 5:05