+ Start a Discussion
msreekmmsreekm 

phone field comparison and formatting

how do we compare phone in lead/account objects in soql where phone in ('111-222-3334','111-222-3335') ..

 

salesforce  stores phone numbers in various fomrats like (xxx) xxx-xxxx , xxx-xxx-xxxx,xxxxxxxxx . Is there an efficient way to compare across all these formats?

 

one poss soln - create a new field and store all phone numbers in same format -eg. xxxxxxxxxx.