none
Replacing the content type on a existing list RRS feed

  • Question

  • Hello,

    I have created a simple list based on the content type 'Item' and populated a few thousand records.  Later, I created a new content type called 'HR document', based on the 'Item' content type.  I've set the new 'HR doc' type to be my default, but is there any way I can change the content type to all previosly created items on my list to show 'HR doc' instead of Item.  I'm not  a developer and I was wondering if there was any way to do this without coding.
    Thank you very much,

    Nathalie
    Monday, May 11, 2009 6:11 PM

Answers

  • I just tested this and it looks like you may have to do (1) a manual "reset" of each item to the new Content Type, or (2) some dev work.

    When allowing the Doc Lib to have multiple Content Types, and then trying to delete one in use (thinking it'll set the existing items to the only Content Type left) you get an error stating that that "Content Type is still in use".

    So, you might have to do it all manually.

    - M
    - Michael Mukalian - MCTS: MOSS 2007 Configuration - http://www.mukalian.com/blog
    • Marked as answer by Nathalieg23 Monday, May 11, 2009 7:04 PM
    Monday, May 11, 2009 6:52 PM
  • Hi Nathalie,

    The content type is a field value that can be modified when you edit the properties of a document. 

    Gary LaPointe has an stsadm extension gl-replacefieldvalues that should work for you.  http://stsadm.blogspot.com/2007/10/replace-field-values.html

    His stsadm extensions are free, http://stsadm.blogspot.com/

    Hopefully that helps.

    Sincerely,
    Karl
    • Marked as answer by Nathalieg23 Monday, May 11, 2009 7:04 PM
    Monday, May 11, 2009 6:58 PM

All replies

  • I just tested this and it looks like you may have to do (1) a manual "reset" of each item to the new Content Type, or (2) some dev work.

    When allowing the Doc Lib to have multiple Content Types, and then trying to delete one in use (thinking it'll set the existing items to the only Content Type left) you get an error stating that that "Content Type is still in use".

    So, you might have to do it all manually.

    - M
    - Michael Mukalian - MCTS: MOSS 2007 Configuration - http://www.mukalian.com/blog
    • Marked as answer by Nathalieg23 Monday, May 11, 2009 7:04 PM
    Monday, May 11, 2009 6:52 PM
  • Hi Nathalie,

    The content type is a field value that can be modified when you edit the properties of a document. 

    Gary LaPointe has an stsadm extension gl-replacefieldvalues that should work for you.  http://stsadm.blogspot.com/2007/10/replace-field-values.html

    His stsadm extensions are free, http://stsadm.blogspot.com/

    Hopefully that helps.

    Sincerely,
    Karl
    • Marked as answer by Nathalieg23 Monday, May 11, 2009 7:04 PM
    Monday, May 11, 2009 6:58 PM
  • Thanks Karl, I will try that stsadm, that should do it. Are the extensions part of the SP2 upgrade? I haven't upgraded yet.

    Thanks again :-) ,

    Nathalie

     

    Monday, May 11, 2009 7:13 PM
  • Hi Michael, that's what I get too when I try to delete the Item content type.  Hopefully I will not have to replace all of them manually.
    Thank you very much,

    Nathalie

    Monday, May 11, 2009 7:14 PM
  • Hi Nathalie,

    Gary LaPointe's stsadm extensions are not part of SP2, but they can be downloaded and installed for free.  You can download them from his site, http://stsadm.blogspot.com/

    Hopefully that helps.

    Sincerely,
    Karl
    Monday, May 11, 2009 7:17 PM
  • Yeah thanks, I just saw the download page for them, I got confused with the first blog in that page about SP2.
    Thank you!

    Nathalie
    Monday, May 11, 2009 7:19 PM
  • Hey Nathalie, keep in mind that the Gary's STSADM extensions are a "use at your own risk".  Not that that's a bad thing, just that you should understand what you're using and what you're using it for.  He's got a ton of other great extensions as well.  Hope all works out. - M
    - Michael Mukalian - MCTS: MOSS 2007 Configuration - http://www.mukalian.com/blog
    Monday, May 11, 2009 7:34 PM