I searched quite extensively but have not found the answer I was hoping to find.
I would like to create a custom field in Case, telling me the Country, based on Internation Phone Country Code.
For instance, is client's telephone number (field name=Case_Phone) is +33680858281, I would like my new field (that I would name Case_Phone_Country) to return "France".
Therefore, a formula saying: if the Case_Phone starts with +33 then Case_Phone_Country is France.
Thank you for your help,
13 réponses
Please try the below
IF(ISBLANK(Case_Phone__c), 'n/a',
CASE(LEFT(Case_Phone__c,4),
'+225', 'Ivory Coast',
'+351', 'Portugal',
'+353', 'Ireland',
'+380', 'Ukraine',
'+228', 'Togo',
'+223', 'Mali',
'+237', 'Cameroon',
'+216', 'Tunisia',
CASE(LEFT(Case_Phone__c,3),
'+33', 'France',
'+39', 'Italy',
'+48', 'Poland',
'+49', 'Germany',
'+32', 'Belgium',
'+34', 'Spain',
'+40', 'Romanai',
'+36', 'Hungary',
'Other'))
)