Fix for issue 1229 to enhance the list level content type in the provisioning engine#1233
Open
wuxiaojun514 wants to merge 3 commits into
Open
Fix for issue 1229 to enhance the list level content type in the provisioning engine#1233wuxiaojun514 wants to merge 3 commits into
wuxiaojun514 wants to merge 3 commits into
Conversation
added 3 commits
April 17, 2026 14:40
1. Add FieldRefs on ContentTypeBinding so Provisioning engine will handle list level content type fieldLink (issue pnp#1229) 2. Add "ContentTypeClientSideComponentAttributes" on ContentTypeBinding so the provisioning engine will handle list content type level ClientSideComponent properties (for FormCustomizer)
remove unnecessary resolver class
- Use 2604 as default version in PnPSchemaFormatter - Better show provisioning status by adding the log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my first PR here.
Please correct me if I miss something or misunderstand something.
Goal
This PR is mainly for issue #1229 and additionally make provisioning engine also support list content type level ClientSideComponent Attributes
Current Problem in provisioning list level content types
Right now our provisioning engine won't export the field ref information on list level content type. Which means if your customized list content type don't have the same settings (field ref, the order of fields, whether the field is reqired/optional/hidden) as its parent level, the provisioning engine won't handle it. (issue #1229 )
Also it won't handle the list content type level clientside component properties (the properties for Form Customizer)
The Changes I did
I did quite a lot changes, I will try to go through them clearly.
Model side
I extended the existing ContentTypeBinding class under list instance with FieldRef collection and client side component attributes (DisplayFormClientSideComponentId/DisplayFormClientSideComponentProperties/NewFormClientSideComponentProperties...)
The exported template will be like this
Schema side
I created a new version of provisioning xml schema (src/lib/PnP.Framework/Provisioning/Providers/Xml/ProvisioningSchema-2026-04.xsd) .

I added the highlighted properties on the new version
Changes on Extract Template
I modified
ExtractContentTypesmethod in ObjectListInstance.cs, now it will also fetch fieldlink information and client side component properties on the list level content typeChanges on Apply Template
I created a new method called
ProcessListContentTypeBindingSettingsin ObjectListInstance.cs to handle all new processes (add/update fieldlink and its hidden/required property , change the sort order of fields) for list content type. This method will be called after ProcessFields method to make sure all list fields has been created.Test Side
I added new test sample xml. This sample test template will be used in test case
CanApplyListInstanceWithListContentTypeFieldRefSettingsin ObjectListInstanceTests.cs to verify whether list content type level's field will be added properly.I added another test case to debug export template in list instance object handler (just for debug purpose, I can remove this test case if you want).
I added a new "XMLSerializer Tester" for new schema version : XMLSerializer202604Tests.cs. 99% content are just copied from previous version. I added two new test cases:
I am not very clear when and where to add test case. Please guide me if I miss something.
Others
I got error here when I tried to apply my template which contains taxonomy field.
Github Copilot suggested me to change use this way to convert the field to taxonomy field (Github Copilot said this way will be more safe...)
I tried to put PnP.Framework.dll into PnP Powershell Project, it seems working well (Did several list provisioning test)
Please let me know if you have any concern on this PR.
Thank you.