sp-dev-docs
sp-dev-docs copied to clipboard
New and Edit forms are reset to default after saving DisplayFormClientSideComponentId for content type
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint CSOM
Developer environment
Windows
What browser(s) / client(s) have you tested
- [ ] 💥 Internet Explorer
- [ ] 💥 Microsoft Edge
- [ ] 💥 Google Chrome
- [ ] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [X] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
CSOM library version Microsoft.SharePointOnline.CSOM.16.1.24810.12000
Describe the bug / error
After saving DisplayFormClientSideComponentId property for content type it's New and Edit forms are reset to default ones.
Steps to reproduce
- Set DisplayFormClientSideComponentId, EditFormClientSideComponentId and NewFormClientSideComponentId to your FormCustomizer ID. Save changes to content type.
contentType.NewFormClientSideComponentId = GUID;
contentType.EditFormClientSideComponentId = GUID;
contentType.DisplayFormClientSideComponentId= GUID;
contentType.Update(false);
contentType.Context.ExecuteQuery();
- Set DisplayFormClientSideComponentId again, save changes
contentType.DisplayFormClientSideComponentId= GUID;
contentType.Update(false);
contentType.Context.ExecuteQuery();
- Open display form - it renders your form customizer as expected
- Oped New and Edit forms - default forms are rendered in dialog window
Expected behavior
New and Edit forms are rendered using FormCustomizer