0

Sharepoint 2013. I have 2 features installed. First has a content type with document list definions and second has workflow for it. Now I need to make changes to them and also add another content type with workflow for it. What's the best way to do it? I've tried to upgrade feature, but no changes has been applied.

  • Please take a look at this question if you are experiencing the same symptoms: sharepoint.stackexchange.com/questions/119416/… – Slaven Semper Dec 11 '14 at 10:13
  • thanks for you reply, but I'm deploying features not on the development machine – Chetvergov Dec 11 '14 at 10:21
  • Are you using Update-SPSolution cmdlet? – Slaven Semper Dec 11 '14 at 10:23
  • Slaven, yes. Just noticed that I have new Content Type added to site, but it's not associated with the list and new Workflow (for new Content Type) is also missing – Chetvergov Dec 11 '14 at 10:33
  • Try to disable/enable the feature. – Slaven Semper Dec 11 '14 at 10:34
3

You cannot update existing Content Type (or list) definitions by installing updated feature that contains updated definitions. You need to add custom code that is run when feature is activated and which updates existing content type and list.

The new content type/list definition pair you can add using the same method you did for the first ones earlier - but when you need to update those later, you need to do the same custom updating mentioned above.

So in your updated feature, you need to look at the existing feature version number, and based on that update the definitions. If you don't have version number in your old features, you need to programmatically look at the existing content types/list definitions and determine if they need to be updated. So, always add version number to features.

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.