0

My problem is that i need to change the parent content type of a few of my content types, I know this isn't possible and the fix is to recreate these content types manually/powershell which I am more than comfortable with doing.

Saying that I have had a left field idea which is why i am coming to you guys for a sanity check. The idea I had is to use code to export the content types into an XML file change the required content types and then import again. In my head this will work but then again i am not sure what will happen if i don't change the ID's etc. I am also exporting from 2013 and importing to Online.

Any help will be greatly appreciated, even if it is to say the idea is silly and go back to the other method.

1 Answer 1

0

I am all for testing out left field ideas - they almost always lead to learning something about the platform's internals. So go ahead, get a test site or a test farm/tenant and try it out.

That said, here's what I think is going to happen: A Content Type's inheritance chain - it's DNA, if you will - is bound up in its Content Type ID. So if you re-import your new content type, you'll have to change its ID, so you're going to end up creating a new content type altogether.

Here's what I would do: Deploy the new content type alongside the existing one. Mark the existing content type as Hidden. Deleting content types from a list/library is tricky and I won't get into that here.

Now, if you have existing data, you'll need to iterate those items and swap out the content type and fill out metadata as needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.