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
FranckFranck 

International format on lead field phone


Dear all,

I am currently strugling with a process builder in order to make an automation that could solve this requirement on lead object  :
- if the the field Phone start with 01,02,03,04,05,09 i need an automation that could replace 0 by +33.

Example : if the phone number is 0158234567 the automation will update it by +33158234567.

Currently i put in place this formula but it's not working :

=================
IF(FIND('.',[Lead].Phone)>0, 

'+33'& RIGHT(SUBSTITUTE([Lead].Phone,'.','') , LEN( SUBSTITUTE([Lead].Phone,'.',''))-1),  

IF(FIND('-',[Lead].Phone)>0 , '+33'& RIGHT(SUBSTITUTE([Lead].Phone,'-','') , LEN(SUBSTITUTE([Lead].Phone,'-',''))-1), 

IF(FIND(' ',[Lead].Phone)>0 , '+33'& RIGHT(SUBSTITUTE([Lead].Phone,' ','') , LEN(SUBSTITUTE([Lead].Phone,' ',''))-1), 

'+33'& RIGHT([Lead].Phone , LEN([Lead].Phone)-1))))
=================

Thanks in advance.
Best Answer chosen by Franck
ANUTEJANUTEJ (Salesforce Developers) 
Hi Franck,

>> https://developer.salesforce.com/forums/?id=906F00000009FN3IAM

The above link shows an implementation with workflow rules that you can check once.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.

All Answers

ANUTEJANUTEJ (Salesforce Developers) 
Hi Franck,

>> https://developer.salesforce.com/forums/?id=906F00000009FN3IAM

The above link shows an implementation with workflow rules that you can check once.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
This was selected as the best answer
FranckFranck
Thanks ANUTEJ !