As we already know, nowaday the most used approach is to use PnP scripts and this is something i really like, but i also have to deal with a great team with really good skills in RPA and IT in general, but i could not waste my time explaining how to use another tool, because of we need to just to set up some SP web sites with old-fashioned custom lists.
So i explained them something about sandbox solution, but surprise surprise, customer enjoyed a lot the POC and asked us lot of CRs, including adding some JavaScript to the custom form and (nooooo!) adding fields to content types.
With Francesco Cruciani (thx man), I figured out how to solve the problem, simply attacking the feature manifest.
The solution is really simple and you can download it simply clicking here.
As you can see we have:
- Some fields
- 1 CT
- 1 List definition
- 1 Feature
Solution structure |
Now, let's start with the update:
- Let's add a Field file: we called it Fields_Update
- Then update the CT and List Definition: we like order ;-)
Only visible difference is Fields_Update |
We just add the new module in the feature |
As you can see we have just applied the new manifest, with an explicit reference to the action of adding field to a content type and then pushing down the update, so also the content type instances will be updated: you just have to upload again the wsp with a different name, and upgrade the solution from SandBox solution menu and that's all.
No way if you want to change order of Field in the mask or change data type, we have not investigated further.
This post helps you only to remember that sometimes, old fashioned way could be useful to make your life a little easier.
This comment has been removed by the author.
ReplyDelete