Skip to content

"Add new item" for SharePoint lists broken in Teams #10135

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

Open
1 of 9 tasks
vladigubler opened this issue Feb 28, 2025 · 9 comments
Open
1 of 9 tasks

"Add new item" for SharePoint lists broken in Teams #10135

vladigubler opened this issue Feb 28, 2025 · 9 comments
Assignees
Labels
sharepoint-developer-support sharepoint-developer-support type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@vladigubler
Copy link

Target SharePoint environment

SharePoint Online

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

💥 SharePoint Framework

Developer environment

None

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

SharePoint Online generic list with Microsoft Lists interface. MS Teams desktop client.

Describe the bug / error

  1. List as a custom New form added through the "NewFormUrl" property of the content type
  2. The list uses the Microsoft Lists interface
  3. The list is added to a Teams group using the SharePoint app
  4. When in Teams, the "Add new item" button doesn't function, clicking on it does nothing

Steps to reproduce

  1. Create a new custom list in SPO
  2. Set the NewFormUrl property of the Item content type (for example by the means of SPFx solution)
  3. In a Teams group add a new SharePoint app
  4. In the app properties specify the list URL
  5. Click on "Add new item" button on the list's toolbar while within the Teams app

Expected behavior

Should navigate to the form and open it inside Teams

@vladigubler vladigubler added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Feb 28, 2025
@ChetanSharma-msft ChetanSharma-msft added the sharepoint-developer-support sharepoint-developer-support label Mar 4, 2025
@ChetanSharma-msft
Copy link

Hello @vladigubler - Thanks for raising your query.
We will look into it and let you know the updates.

@Ashlesha-MSFT
Copy link

@vladigubler,
Could you please share code that you are using to repro the issue.

  1. I couldn't get exactly how you are doing "Set the NewFormUrl property"
  2. Using below doc https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api but I couldn't able to add .sppkg file to teams
    Please share your insights!

@Ashlesha-MSFT Ashlesha-MSFT added the Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. label Mar 5, 2025
@vladigubler
Copy link
Author

vladigubler commented Mar 5, 2025

It's not a command set, it's a form customizer. the code of that doesn't matter.
The new form is set via REST API.
It's a PATCH call to site URL/_api/web/lists(guid'list ID')/ContentTypes('content type ID')
with body: { NewFormClientSideComponentId: * custom form ID *}

Similar to this:
https://pnp.github.io/powershell/cmdlets/Add-PnPApplicationCustomizer.html
Note that it works well if the list doesn't use MS List, but the regular modern list view. Only when the list is rendered by MS List, then it's broken.

@Ashlesha-MSFT
Copy link

@vladigubler,
I am trying to use NewFormClientSideComponentId like below but I could not able to get the "NewFormUrl" and "NewFormClientSideComponentId". I have created custom content type with parent type as "item" but still can't able to get.

$ctype = Get-PnPContentType -List "Bussiness"

$ctype.NewFormUrl

$ctype.NewFormClientSideComponentId

@vladigubler
Copy link
Author

NewFormUrl is not needed, only NewFormClientSideComponentId
You need to set it to the component ID in your SPFx form customizer solution.
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-form-customizer

@Ashlesha-MSFT
Copy link

@vladigubler,
I have set NewFormClientSideComponentId as like given in the document.
And in that way "add new item" is working for me

@vladigubler
Copy link
Author

Are you displaying the list in Teams? Neither me nor a customer are able to get it to work.

@Ashlesha-MSFT
Copy link

@vladigubler,
Yes, I am displaying list in teams

@vladigubler
Copy link
Author

Hmm, it works for me too now. Maybe some fix was released in the meantime?

@Ashlesha-MSFT Ashlesha-MSFT removed the Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sharepoint-developer-support sharepoint-developer-support type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

3 participants