Can i map the original ID to a new custom Field

Migrating of documents cannot prevent the ids without the not recommend database write.

So i try to map the ItemId to an other field, because it is neccesary not to lose this information.

 

But under Mapping Options -> Map list item data to different columns i can't find the Id Column in the source columns

 

Haw can i migrate the original id information?

 

KR Jan

  • As far as I am aware that's not possible. Best option is to use the Metalogix API's to write a post-migration script to copy the ID column values.

  • Hi Jan,

     

    If you are using Advanced mode, are migrating from SharePoint 2010 or higher, and want to preserve the values in the Document ID field that is enabled with the Document ID Service feature (which must be enabled at the Site Collection level), check the Preserve SharePoint Document IDs (Requires SharePoint Crawl) box.

    This check-box will only be enabled when migrating from a SharePoint 2010 or higher source.

     

    For more details about Migrating with Document IDs, you may refer to the link below.

     

    www.metalogix.com/.../migrating_with_sp_document_ids.html

     

    Regards,

    Bianca

  • Hi Bianca,

     

    i'm not interested in the Document ID field,

     

    I need to know the Listitem ID Field.

     

    KR Jan

  • Hi Jan,

     

    Apologies, If you want to preserve IDs for any folders and items in SharePoint lists, so each item and folder will have the same ID on the target as it does on the source, make sure the Preserve IDs on items/folders in Lists on the target option is selected.

    • If this option is not selected then SharePoint will assign an item ID automatically.
    • This option is used for Incremental Migrations, and does not apply to Document Libraries.

     

    For more information on incremental copying and preserving ID’s, please refer to the link below.

     

    www.metalogix.com/.../preserving_sharepoint_list_item_ids.html

     

    Regards,

    Bianca

  • Hi Bianca,

     

    i know that it is not supported for document libraries.

     

    That's why i need a way to have the old ID in a column after the migration.

     

    It is okay for me, that the new document will have a new id, but i have to now what the old id.

     

    KR Jan

  • Hi Jan,

     

    Sharepoint List item IDs can be preserved when migrating content, as long as there is an Object Model (OM) connection to the target (either through a Local connection, or the use of the Metalogix Extensions Web Service), and the Preserve IDs on items/folders in Lists option is selected.

     

    Regards,

    Bianca

  • But this does not work for document libraries.

    Thats why i need know the original id after migrationg a documentlibrary.

     

    KR Jan

  • I found a solution. I use Invoke powershellscript durint migration and inside the dataobject, the original id ist accessable.

  • Yes, this is what I did

    1. wrote a transformation to append original ID's to title columns
    2. Post migration powershell script to create a site column and added the site columns to all document library
    3. Looped through all documents and copied the original id to the created column.
  • So Preserve ID's works great on Full copies. I have noticed if I have test data it wont overwrite it if I am only using a Custom Copy with Preserve Items checked.

    With that said, I wanted to write items from 1 list into a duplicate list, but since the second list is an archive I want to write the first list items ID to a custom column in the second list as OriginalID. The second list I choose NOT to preserve the ID since I am writing it to OriginalID. You can do it if you want, but then you could just do a calculated column on the second list and not have to worry about mapping columns.

    I created a job and mapped the column (but since I could not find ID in the UI) I mapped the source column to a unique column (blahblah) that existed in the first list to ID on the second list and clicked Map. 

    Then I exported the complete job to PowerShell, opened the ps1 file in notepad and searched for my blahblah column. Its a single line on Copy=MLAllListItems object. StaticName=`"ID`" Name=`"ID`" , etc. and left OriginalID as is. The ColName=int5 didnt mess up the operation, I was worried I would have to hunt down some view column ID or something but I just left it.

    I then ran my migration PS1 job and BAM! The ID is mapped to OriginalID in the second list.