718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

If you need to migrate data to Microsoft Dynamics CRM where the phone number field(s) contain leading zeros, this blog is for you! Using a migration tool such as Scribe Insight in CRM, we can use a series of functions/formulas to address this issue.


The following function will not only handle the leading zeros, but if there are exactly 10 numeric characters in the source, it will also format it as (xxx) xxx-xxxx. If there are not exactly 10 characters in the source, the function will simply populate the raw value from your source.

Here is the formula. You’ll want to replace all of the “S8″ values with the appropriate field from your source.

IF(ISERROR(S8),#NULL!,IF(S8=”NULL”,#NULL!,IF(LEN(STRIP(S8,”N”))=10,CONCATENATE(“(“,LEFT( STRIP(S8,”N”),3 ), “) “, MID( STRIP(S8,”N”),4 ,3 ),”-“,MID( STRIP(S8,”N”),7 ,4 )),LEFT(S8,30))))

That’s it!

For additional tips and tricks, please keep following our blog. And as always, if you need additional assistance with Dynamics CRM, feel free to reach out to us.

Happy CRM’ing!

Avatar for JoeCRM


Joe CRM is a CRM superhero who runs on pure Microsoft Dynamics CRM adrenaline. As the face of PowerObjects, Joe CRM’s mission is to reveal innovative ways to use Dynamics CRM and bring the application to more businesses and organizations around the world.