Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPFx 1.15 - Getting error when use form customiser to view existing list item in Classic mode #8272

Closed
1 of 9 tasks
ethanli83 opened this issue Jul 5, 2022 · 8 comments
Closed
1 of 9 tasks
Assignees
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:fixed-next-drop Issue planned to be fixed in an upcoming release. type:bug-confirmed Confirmed bug, not working as designed / expected.
Milestone

Comments

@ethanli83
Copy link

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc

Describe the bug / error

I'm getting an error below when I'm try to view an existing list item with form customiser in Classic mode.

image

Steps to reproduce

  1. Create a Form customiser extension and deploy to a SharePoint site.
  2. Create a new list.
  3. Create a new item on the list.
  4. Update the DisplayFormClientSideComponentId of the Item content type to the component id of the Form customiser component.
  5. Switch to Classic mode.
  6. Click on the item.

Expected behavior

The form customiser shows up correctly

@ethanli83 ethanli83 added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Jul 5, 2022
@ghost
Copy link

ghost commented Jul 5, 2022

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 Awaiting categorization and initial review. label Jul 5, 2022
@ethanli83 ethanli83 changed the title Getting error when use form customiser to view existing list item in Classic mode SPFx 1.15 - Getting error when use form customiser to view existing list item in Classic mode Jul 5, 2022
@AJIXuMuK AJIXuMuK added area:spfx Category: SharePoint Framework (not extensions related) and removed Needs: Triage 🔍 Awaiting categorization and initial review. labels Jul 5, 2022
@AJIXuMuK AJIXuMuK self-assigned this Jul 5, 2022
@ejazhussain
Copy link

ejazhussain commented Jul 6, 2022

@ethanli83 @AJIXuMuK

How do we do the following step? is it possible via PowerShell?

  1. Update the DisplayFormClientSideComponentId of the a content type to the component id of the Form customiser component.

@ethanli83
Copy link
Author

ethanli83 commented Jul 7, 2022

@ethanli83 @AJIXuMuK

How do we do the following step? is it possible via PowerShell?

  1. Update the DisplayFormClientSideComponentId of the a content type to the component id of the Form customiser component.

I did it by a C# programming using CSOM, but I think you can archive this by PowerShell.

All you need to do is to update the ContentType.

Here is how I did it

using (var clientContext = new ClientContext("YOUR SITE"))
{
    var sString = new NetworkCredential("", "PASSWORD").SecurePassword;
    clientContext.Credentials = new SharePointOnlineCredentials("USER NAME", sString);

    var list = clientContext.Web.Lists.GetByTitle("YOUR LIST");
    
    // Load content type collection
    clientContext.Load(list, l => l.Title, l => l.ContentTypes.Include(c => c.NewFormClientSideComponentId, c => c.EditFormClientSideComponentId, c => c.DisplayFormClientSideComponentId));
    await clientContext.ExecuteQueryAsync();

    var contentType = list.ContentTypes.First();

    var componentId = "COMPONENT ID OF YOUR FORM CUSTOMIZER";
    contentType.NewFormClientSideComponentId = componentId;
    contentType.EditFormClientSideComponentId = componentId;
    contentType.DisplayFormClientSideComponentId = componentId;

    contentType.Update(false);

    await clientContext.ExecuteQueryAsync();

    Console.ReadKey();
}

@ejazhussain
Copy link

Thanks, @ethanli83 I have ended up writing similar code to update components Ids.

@AJIXuMuK AJIXuMuK added status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug-confirmed Confirmed bug, not working as designed / expected. and removed type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. labels Jul 7, 2022
@AJIXuMuK
Copy link
Collaborator

@ethanli83 - the fix has been merged and will be rolled out WW in the next couple of weeks.

@AJIXuMuK AJIXuMuK added status:fixed-next-drop Issue planned to be fixed in an upcoming release. and removed status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. labels Jul 21, 2022
@AJIXuMuK AJIXuMuK added this to the server 07-26 milestone Jul 21, 2022
@ethanli83
Copy link
Author

@ethanli83 - the fix has been merged and will be rolled out WW in the next couple of weeks.

Thank you very much~

@AJIXuMuK
Copy link
Collaborator

Should be rolled out WW by now

@ghost
Copy link

ghost commented Sep 2, 2022

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@ghost ghost locked as resolved and limited conversation to collaborators Sep 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:fixed-next-drop Issue planned to be fixed in an upcoming release. type:bug-confirmed Confirmed bug, not working as designed / expected.
Projects
None yet
Development

No branches or pull requests

3 participants