You need to sign in to do that
Don't have an account?

Phone Field in Account
I need a rule or code for the Phone field in Accounts that if someone leaves out the +1 on a US number, I would like Salesforce to just put it in silently.
Currently all telephone numbers for the US start with +1 ,then area code and local number (i.e. “(454) 565-4252”) .
Any Suggestions!
I'd suggest you'll need to use a before update trigger on the Account object which re-writes the phone number
You can use workflow field update to do this. If the phone is US number then update the phone field with adding +1 to the existing value.
I have a question, how do you recognize it as US number?
And I didn't understand why you are posting it twice? http://boards.developerforce.com/t5/Formulas-Validation-Rules/Account-Field-Phone/td-p/318695 This is duplicate post. Please dont do this.
Many questions/concerns comes in my mind over this :
1) When you have US local selected then when ever a 10-Digit number is filled in phone it gets formatted automatically like this : (999) 999-9999
2) When we enter 19999999999 , still it will give us the same (999) 999-9999
3) But when we enter +19999999999 , it will save as is +19999999999
3) Now what exactly you want?
i) If I enter a 10-Digit number which is not starting with +1 then append +1 before the number ie when I enter 9999999999 OR 19999999999 it should save like this +19999999999. If yes then here is the code :
ii) When I enter any number which is not starting with +1 should get +1 then here is the code
If you have any other requirement then you can change the trigger, or do let me know if you are unable to make it. Just specify what exactly you want.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
I forgot to apply the condition
Before the execution of the code, Please put this else you may got null pointer exception.
Thanks
Ankit Arora
Blog | Facebook | Blog Page