We've developed a custom Sharepoint feature with almost everything in it (custom columns, custom content types, custom master page, custom page layouts, etc). Everything is working fine, but I'm facing two main consistency problems in the going to production phase that I'm not able to resolve:

  • If someone by mistake delete one of the lookup list in the root web, I've created an event receiver to create it again, and it works fine but it broke the link between it and the custom content type in the subsites. There's no proper way I found to reset it and make it work again I've developed a custom console application to reset the lookup definition (getting SPFieldLookup in the root site and resetting LookupList and LookupWebId, but i found the lookup was already set with the right GUID) and to get the content type of the subsite and trying to reset the FieldLink (deleting it from the FieldLinks collection of the content type and adding it again). Nothing works: neither deleting all the content of the subsite and removing/adding the content type (even if it's not a viable option for a producion environment). The only thing that works is deleting the subsite and let the feature create it again (and obviously is something I can't do in production!).
  • If for any reason in a wave 2 or 3 in the development process I need to add a new Site column to an existing content type, I cannot manage to propagate the changes to the subsites. I see the new column in the root site, I see the content type in the root site with the new column, but in the lists in the subsites using that content type I always see the content type without the new column. No idea what to do here: the only thing that work is adding manually the column to the content type for each list using it: time consuming, and the column is added for EVERY content type in the list, not only the custom one.

If someone could advice would be great!

Thanks Alessandro

  • (ContentTypes/Fields) : SharePoint is deceiving, in truth all CTs on lists are copies, so... just like you do in the UI.. you need to update all copies explicitly.. I forgot what the commands/code was Commented Apr 1, 2017 at 11:24
  • @danny thai means that for the second question i need in the event receiver to cycle every subsite and ensure the columns on the main site reflects the ones on the subsite? This does not apply for the first question though? Commented Apr 1, 2017 at 13:04
  • Yes, your 2nd question. Maybe it is better to ask the questions separately with good titles and concise questions Commented Apr 2, 2017 at 9:48
  • Thanks Danny, I'll post two different question and see how it goes Commented Apr 3, 2017 at 8:45

1 Answer 1


As for Danny's advice, I've splitted the question in two different ones, to avoid confusion:

Custom Sharepoint solution: problems when adding content type column

Custom sharepoint solution: missing link between content type and lookup when deleted by mistake


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.