locked
Update Phone Number format RRS feed

  • Question

  • Hi

       I have applied phone number format on Business Phone in Contact using java script which is working fine. now, I want to update existing phone numbers. how I do that.

    like if phone number is 1235467890 then 123-546-7890 or  any other format convert into that format.

    If anyone have an idea please share with me.

    Wednesday, September 11, 2013 12:16 PM

Answers

  • You can create a custom workflow activity that will format the number in the same way as your javascript code does and run a workflow to fix the existing records.

    Or you can create a C# console application that will retrieve the records, fix the number format and update the record.

    You can also export the contacts as excel file (make the file to be reimported later) change the number format inside excel and import back the file.


    My blog: www.crmanswers.net

    • Proposed as answer by Guido PreiteMVP Wednesday, September 11, 2013 12:47 PM
    • Marked as answer by Riaz Usmani Wednesday, September 11, 2013 12:50 PM
    Wednesday, September 11, 2013 12:47 PM
  • Since you won't be able to apply the JavaScript to the existing records without opening them, one option is to export the data to Excel using the option to make the data available to re-import. Once you open the resulting file in Excel you should be able to fairly quickly reformat the phone numbers, save the file and the re-import. 

    A formula like this: =TEXT(A1,"000-000-0000")


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Wednesday, September 11, 2013 12:48 PM
    Moderator

All replies

  • You can create a custom workflow activity that will format the number in the same way as your javascript code does and run a workflow to fix the existing records.

    Or you can create a C# console application that will retrieve the records, fix the number format and update the record.

    You can also export the contacts as excel file (make the file to be reimported later) change the number format inside excel and import back the file.


    My blog: www.crmanswers.net

    • Proposed as answer by Guido PreiteMVP Wednesday, September 11, 2013 12:47 PM
    • Marked as answer by Riaz Usmani Wednesday, September 11, 2013 12:50 PM
    Wednesday, September 11, 2013 12:47 PM
  • Since you won't be able to apply the JavaScript to the existing records without opening them, one option is to export the data to Excel using the option to make the data available to re-import. Once you open the resulting file in Excel you should be able to fairly quickly reformat the phone numbers, save the file and the re-import. 

    A formula like this: =TEXT(A1,"000-000-0000")


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Wednesday, September 11, 2013 12:48 PM
    Moderator
  • Thanks for reply I think it will solve my Issue 

    Wednesday, September 11, 2013 12:51 PM