Cloud

Where does SharePoint store MS Project column mappings?

I came across something interesting in SharePoint the other day. I knew that a user can open a SharePoint task list in MS Project, edit the items, then hit save, and the changes will be reflected in the task list. This can be done by going to the task list screen, clicking on the “List” ribbon and then clicking “Open with Project”.
I was working with a third party product that uses the task list in SharePoint, but the list had been customized to include a good number of new columns that aren’t part of the default SharePoint task list. When editing in Project, using the aforementioned workflow, some of those custom columns were already included in the MS Project file. This wasn’t too surprising as the list was associated with a template project file, and that template had the mappings already set. You can view the mappings from within MS Project by going to File -> Info, and then clicking the “Map Fields” button, which is visible if the MS Project file has already been synced with SharePoint.

What surprised me was the fact that I created a blank MS Project file, added some tasks, and then synced it with an existing SharePoint task list — which can be done using File -> Save As — all of the column mappings still came through. How is this possible? My tasks were synced back to SharePoint, so that means the template MS Project file wasn’t used. I could tell when I closed MS Project and then opened it again using the ribbon in SharePoint that it was my file that was used; it wasn’t merged with an existing file.
The only explanation I could come up with is that SharePoint was actually storing the column mappings somewhere, but where? It took me a while to find the answer. I couldn’t find it online, so I grabbed a copy of SharePoint Manager¬†and started digging through the site structure.
It turns out that the column mappings are stored in the task list itself. If you go to the Root Folder of the list, then go to the Properties collection, there is a property called “WSSSyncFieldMap”, but only if the task list has been synchronized with an MS Project file first. The value of that property is an XML fragment. That fragment contains the column mappings between the SharePoint task list and MS Project.
It’s worth noting that there are some column mappings that can’t be edited via MS Project, these mappings are assumed by SharePoint and MS Project, and they will not appear in the XML Fragment.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Weekly Blog Digest:

Sign Up
Follow Us
TwitterLinkedinFacebookYoutubeInstagram