function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
String strPhoneNumber = '+19876543210'; if(strPhoneNumber.startsWith('+1')) { strPhoneNumber = strPhoneNumber.remove('+1'); } System.debug('strPhoneNumber ======> '+strPhoneNumber);
String IncomingNumber = '+12529874405'; string strPhoneNumber; if(IncomingNUmber.startsWith('+1')){ strPhoneNumber = IncomingNumber.remove('+1'); } else if(IncomingNumber.startsWith('1') && IncomingNumber.length()>10){ strPhoneNumber=IncomingNumber.removeStart('1'); } else{ strPhoneNumber =IncomingNumber; } System.debug('strPhoneNumber ======> '+strPhoneNumber);
Use TRIM(RIGHT(TEXT(Phone),10)) in formula field.
Hope it helps, if it does mark it as solved.
Thanks
try below code in your apex class Kindly mark this as solved if the reply was helpful.
Thanks
Shaik
Try the below code:
Thanks,
Sarvani