locked
Updating a field value for all records in a custom entity RRS feed

  • Question

  • I have the need to update all the records in a custom entity. There are over 12 thousand records in this entity and I need amend a text field (new_userid) length 6 , to left pad them with 0,

    I.e. if a new_userid = 123 ,  then I need to have it updated to 000123

    I have thought about doing an Update directly within SQL but have heard that accessing the database directly is frowned on. Doing the update via SQL is not a problem for me ,  but I would rather make sure it is done correctly. I would welcome any advice


    Dont ask me .. i dont know

    Wednesday, July 23, 2014 10:09 AM

Answers

  • You can export the records as Excel for reimport and make this change inside excel. Due to the 10000 record limit, you need to do this export/edit/import twice, run an advanced find with some criteria to separate the records (for example CreatedOn on or Before a certain date, and for the second batch CreatedOn on or After)

    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by Guido PreiteMVP Wednesday, July 23, 2014 10:18 AM
    • Marked as answer by Pete Newman Wednesday, July 23, 2014 10:24 AM
    Wednesday, July 23, 2014 10:18 AM
  • Make sure if you do this that you have Excel configured not to strip leading zeroes.  I had that issue a while back sorting out an issue like this and it was maddening until I realized Excel strips leading zeroes by default.

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

    • Marked as answer by Pete Newman Thursday, July 24, 2014 9:28 AM
    Wednesday, July 23, 2014 8:32 PM

All replies

  • You can export the records as Excel for reimport and make this change inside excel. Due to the 10000 record limit, you need to do this export/edit/import twice, run an advanced find with some criteria to separate the records (for example CreatedOn on or Before a certain date, and for the second batch CreatedOn on or After)

    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by Guido PreiteMVP Wednesday, July 23, 2014 10:18 AM
    • Marked as answer by Pete Newman Wednesday, July 23, 2014 10:24 AM
    Wednesday, July 23, 2014 10:18 AM
  • Make sure if you do this that you have Excel configured not to strip leading zeroes.  I had that issue a while back sorting out an issue like this and it was maddening until I realized Excel strips leading zeroes by default.

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

    • Marked as answer by Pete Newman Thursday, July 24, 2014 9:28 AM
    Wednesday, July 23, 2014 8:32 PM