We want to synchronize data across several environments that are not production, ie dev, test ect. We have several list that are set to order by ID. The problem is that when doing the content deployment the ID's are not kept in sync across environments which causes the data to not display in the expected order. Is there a way to reseed the ID's in the receiving tables to match the record being inserted?
|
The best way I've found to do this is to periodically copy the content database itself back down from Production and attach copies of it to each of the environments. This is very simple to do but does have a few potential drawbacks, such as:
That said, it has some very strong points as well
|
||||
|
|
In SharePoint list ids only remain the same if the lists were created declaratively (ie defined in XML in a feature). If the lists are created through the UI, in script, or programatically they will get a new id in the import destination. It's a big plus for defining lists (properly) in features. I think. |
|||
|
|
|
Thanks for the responses guys. As the Content Deployment is a requirement across several version of the production site as well a db restore is not a valid solution for us. What I ended up doing was creating an additional column in the list to support sort order (int), then wrote n OrderBy query in CAML to sort by that column. This was where I was trying to go to begin with but for some reason the way my access in the Site Admin was set up limited what actions I could take on that column. We ended up getting that prepped and the query works great. |
|||
|
|