sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

New and Edit forms are reset to default after saving DisplayFormClientSideComponentId for content type

Open xxyziggy opened this issue 1 year ago • 0 comments

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

  1. 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();
  1. Set DisplayFormClientSideComponentId again, save changes
contentType.DisplayFormClientSideComponentId= GUID;
contentType.Update(false);
contentType.Context.ExecuteQuery();
  1. Open display form - it renders your form customizer as expected
  2. Oped New and Edit forms - default forms are rendered in dialog window

Expected behavior

New and Edit forms are rendered using FormCustomizer

xxyziggy avatar Oct 18 '24 18:10 xxyziggy