3 Replies Latest reply on May 14, 2020 7:41 AM by andrelerche

    CRM 11.9 - phone country code format

    olivier_h Novice

      Hello,

       

      On company, the field Phone, the country code is autocompleted depending on the counrty. This is an helpful option, but is anyone knows iof there is a way to delete the "0" on the phone number when a country code is filled ?
      Because of course when you have a country code, the phone number must be without the first "0" which is only for national calls. So it should be deleted when there is a country code to avoid some users mistakes.

      Thanks for your help,

       

      Best regards,

       

      Olivier

        • Re: CRM 11.9 - phone country code format
          andrelerche Novice

          Dear Olivier,

           

          first of all, if you're using CRM.phone for inbound and outbound calls it will handle this issue for you. So for outgoing calls, it will ignore the leading zero in the city code if needed.

           

          In any case, if you want to remove the leading zero, you can do this via trigger type "transform" using a regular expression like t,(0)(.*),$2

           

          Please also note that Italy, for example, requires the leading zero for the city code even when calling with an international number.

           

          Best regards,

           

          Andre

          2 people found this helpful
          • Re: CRM 11.9 - phone country code format
            olivier_h Novice

            Hello Andre,

             

            Thanks for your answer, you right if i use a trigger to delete the 0, it will delete also essentials 0 on phone number, even on country codes ending by 0 like Gambia (+220). I know thaht is not a major case because phone systems correct phone numbers if there is a national country code + 0, but not android systems like my phone. If i directly click on a phone from CRM it doesn't work.

            By thinking of thaht i can see a solution, can we create the trigger for deleting the first 0 by having an exception on some countries which country code ending by 0, do you think thaht it could be possible ?

             

            Thanks,

             

            Best regards,

             

            Olivier.

              • Re: CRM 11.9 - phone country code format
                andrelerche Novice

                Dear Olivier,

                 

                sure, you could call the trigger in the rights on certain conditions only (like just for specific countries). But the regex I shared will only delete a leading zero, so it should not delete the 0 from +220. Also, this trigger was only thought to hook on the city code field. So you have the country code, the city code, and the telephone number. The trigger could be used to remove the leading zero from the city code and then you could combine these 3 values into the "full" telephone number you use for an international call.

                 

                Best regards,

                 

                Andre

                1 person found this helpful