When using the out of the box function in Microsoft Project 2013, Share – Sync with SharePoint there is an amazing issue that we have noticed.
The Problem
Most people would like to have their tasks in the same order that they are listed in the Microsoft Project file displayed in SharePoint. However this is not out of the box. When the Tasks are synced to SharePoint the first time, SharePoint assigns a SharePoint ID for each Task. It also retains the TaskUID from Microsoft Project so that it can process any changes, etc. The main issue is that there is no field set in SharePoint to store the Task ID of Microsoft Project and you can also display the TaskUID on any views by default.
The Solution
So in order to solve two problems one making sure that a user could find the task in the Microsoft Project schedule and identify if also in the SharePoint list, we came up with the following. The second is a user should be able to have the list in the same order in both places.
First step is to create a Custom number field in Microsoft Project, we named it ProjTaskID.
We then copy the values of the ID field into the ProjTaskID so that they were equal from the Project Summary task down to each subtask.
Then we added our new custom field to the Sync by selecting, Info - Save and Sync Your Project - Map Fields. On the Mapped fields dialog, press the Add Fields button and locate the ProjTaskID field created above.
Press OK when complete and OK again to close the Mapped fields dialog. Now you are ready to Save and Sync with the SharePoint task list again.
Next go to the SharePoint Task list and add the new field as the first display option and then modify the view to be sorted by the ProjTaskID field as follows.
Now your list will be in the exact order as the Microsoft Project Task list. If you choose to automate the process you can use the following Macro to copy, paste, save and sync with the following simple Macro code.
Macro Code
Sub ProjTaskID()
' Macro ProjTaskID
' Macro Recorded Wed 5/15/13 by PM Providers
SelectTaskField Row:=1, Column:="Number1", RowRelative:=False
SelectTaskField RowRelative = True, Row:=0, Column:="ID", Height:=999
EditCopy
SelectTaskField Row:=0, Column:="Number1"
EditPaste
' ManageSiteColumns
SynchronizeWithSite
FileSave
End Sub