1

In this question I asked something very similar, but it was particularly for Sharepoint 2010. We've since migrated to Sharepoint Online and I have a similar problem but with a different scope. I need different answers, so I am asking a new question.

Steps:

  1. Create a custom Content Type using custom Site Columns in the root of the Site Collection
  2. Next, in one of the subsites, create 5 lists that use your custom Content Type. (later on you will have 100 of these)
  3. Then your boss comes and asks you to rename a few columns, so you edit the Content Type and rename the columns. When you push changes to the lists this adds the new columns to your lists. But it also removes the old columns from the list's derived Content Type - so you go back into those lists and manually delete them.
  4. Now the boss comes and asks you to add two or three columns. So you edi the Content Type and add the columns, being sure to check to the box to "Push changes to all lists".

Here is the problem: the new columns do not show up in the lists.

How do I solve this?

In the "Edit 2" section of this answer, there is a powershell script to "Update Content Type", although it is written for Sharepoint 2010 on-prem.

What do I need to do here? How do I get the new columns to show in the lists? (besides rebuilding the lists - which I don't want to do if I have 100 of them). I don't need to update the content type because I've already added the columns in the Content Type via the UI. Also, that script seems to add fields; I just want the list to refresh it's idea of the Content Type.

1

So, this is the answer I've come up with so far (please comment below if any of this is incorrect).

The Site Content Type is basically used as just a template for the List Content Type when applied to the list. True, edits made to Site Columns will push to the lists, but fields added to the CT after the list was created do not seem to push to the lists.

That means that you have to use powershell to actually add the fields (and you can update the other fields whilst you are at it).

Here is the order of the script:

  1. Get the id of the CT that needs to be pushed
  2. Loop through CTs in the subsite and compare their id to the original Site CT's id
  3. If they match, then For each field in the parent CT, loop through all the fields in the child CT and update them or add them if they don't exist in the parent.

See this article on the CT Ids.

[alternate understanding]

Here are some words given to me by a Sharepoint Architect:

The trouble is that once you have a list content type you are stuck with a list content type. There is no way to revert it back to relying on the Site collection level content type because it made a copy and changes were applied to the copy. Removing the changes still leaves it as a copy. If you had created another content type that inherited from the first and put your additional columns in that and then used that in the list then new columns added to the original content type would show up in the inherited content type in the list. But as soon as you make changes at the list level it makes a copy of the content type and uses that in the future. From then on it ignores the original content type because the list is working off a copy.

  • I've also found that fields added to a CT after the CT was added to the list don't show up immediately. What I've done to fix this via the GUI is to go into the site column and save it again. This will propagate the column down to the list. So your proposed script is correct, though you may also be able to just force-update every column in the parent content type to push them down to the list level. – Ted N. Mar 6 '17 at 22:57
  • Are you saying it will force the column itself down to the lists? – bgmCoder Mar 7 '17 at 2:53
  • 1
    Right, if you re-save the column after adding it to the parent CT, it should show up in the child CTs. I'm doing this right now actually - just added a new column to a parent CT, but of course the column isn't in the list yet. Re-saving the column gets it to show up in the list. As you said in your edit, if you've updated the list content type then this may not help... I haven't tested that variation yet. – Ted N. Mar 7 '17 at 16:11
  • When you update the column, do you do it directly from the Site Columns page, or do you do it from the edit command of the Site Content Type for that column? (does that even matter?) – bgmCoder Mar 7 '17 at 16:44
  • Okay, I confirm that if you haven't edited the List Content Type, that adding a column to the Site Content Type will, indeed, push to the lists. – bgmCoder Mar 7 '17 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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