remove the "Content types that are available to this Document Set have been added or removed." message


  • hi all,

    I just migrated about 7000 dossiers from an excel export to SharePoint document sets via a "create item" workflow.

    That works, but all my document sets get this yellow bar on top:

    Content types that are available to this Document Set have been added or removed. Update the Document Set.

    When I click on the link, the message goes away. Is there some kind of Powershell I can run to update all document sets in my list ?

    Regards, Marijn Somers|| SharePoint Consultant- MCTS SharePoint 2007, 2010 configuring || Twitter: ||
    Tuesday, March 15, 2011 10:40 AM


  • Normally this will not happen if the DocumentSet is created using DocumentSet.CreateDocumentSet method. The problem is that the DocumentSet's "docset_LastRefresh" property has not been set. The following code can be used to set it and it will remove the "Yellow Bar" warning.

    public static void UpdateRefreshOfDocumentSet()
          using (SPSite site = new SPSite("http://basesmc2008"))
            using (SPWeb web = site.OpenWeb())
              SPFolder ds = web.GetFolder("http://basesmc2008/testdocsets/newdocset14");
              ds.Item.Properties["docset_LastRefresh"] = SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.UtcNow);

    Blog | SharePoint Field Notes Dev Tool | ClassMaster
    • Marked as answer by Marijn Somers Friday, March 18, 2011 8:27 AM
    Friday, March 18, 2011 3:01 AM