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

"Add new item" for SharePoint lists broken in Teams

Open vladigubler opened this issue 1 year ago โ€ข 16 comments

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
  • [x] ๐Ÿ’ฅ Microsoft Edge
  • [x] ๐Ÿ’ฅ Google Chrome
  • [x] ๐Ÿ’ฅ 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 avatar Feb 28 '25 16:02 vladigubler

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

ChetanSharma-msft avatar Mar 04 '25 05:03 ChetanSharma-msft

@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 avatar Mar 05 '25 03:03 Ashlesha-MSFT

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.

vladigubler avatar Mar 05 '25 16:03 vladigubler

@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

Ashlesha-MSFT avatar Mar 11 '25 16:03 Ashlesha-MSFT

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

vladigubler avatar Mar 11 '25 17:03 vladigubler

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

Ashlesha-MSFT avatar Mar 12 '25 12:03 Ashlesha-MSFT

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

vladigubler avatar Mar 12 '25 13:03 vladigubler

@vladigubler, Yes, I am displaying list in teams

Ashlesha-MSFT avatar Mar 13 '25 05:03 Ashlesha-MSFT

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

vladigubler avatar Mar 13 '25 13:03 vladigubler

Unfortunately, it appears that the issue is there again. I created a simple list, modified the form with a form customizer. Now when the list view is added to a team, the Add new item button in Teams doesn't work. It still works when viewed directly in SP.

Image

Same list here in SP, no issues:

Image

vladigubler avatar Apr 21 '25 20:04 vladigubler

@vladigubler, Just checking in โ€” are you still experiencing the issue?

Ashlesha-MSFT avatar Jul 23 '25 13:07 Ashlesha-MSFT

@Ashlesha-MSFT unfortunately, yes, still the same problem. The button simply doesn't do anything.

vladigubler avatar Jul 23 '25 15:07 vladigubler

@vladigubler, Thank you for your patience and support.

I have been able to reproduce the issue where the SPFx Form Customizer works correctly when accessing the SharePoint list tab via the Teams web client, but it does not open the custom form when using the Microsoft Teams desktop app.

Based on this, I can confirm this is a bug specific to the Teams desktop application. We will proceed to raise this issue with the engineering team for further investigation and resolution.

Apologies for the delayed response and thank you again for your assistance.

https://github.com/user-attachments/assets/6546a603-9f00-4ff4-9cfc-168713ff3671

https://github.com/user-attachments/assets/7e236cdd-6685-4bc4-97a3-f96bd75b8cbb

Ashlesha-MSFT avatar Jul 24 '25 08:07 Ashlesha-MSFT

Good to know you were able to recreate. Awaiting further progress. Thanks!

vladigubler avatar Jul 24 '25 15:07 vladigubler

https://github.com/SharePoint/sp-dev-docs/issues/10039#issuecomment-3189163712

Ashlesha-MSFT avatar Aug 21 '25 10:08 Ashlesha-MSFT

Hi,

There is a serious outage happening during the last 4 days on multiple tenants. Command bar buttons added via an SPFx extension do not show up. I opened an issue here this morning: SPFx command bar buttons do not appear ยท Issue #11028 ยท SharePoint/sp-dev-docshttps://github.com/SharePoint/sp-dev-docs/issues/11028 But no response yet. Multiple customers are not able to work in their environments.

Regards,

Vladimir Gubler

https://www.infowisesolutions.comhttps://www.infowisesolutions.com/

[cid:e3ef7df1-361c-4077-9663-e43781753c0b] [cid:49172413-6119-4ed6-8bf6-4d300f8dc51d] https://www.facebook.com/infowise [cid:bf2e2af5-a464-4114-a415-3eca0cd20f2f] https://www.linkedin.com/company/infowise [cid:72c75a82-1ea1-426d-99d6-ee5fb93f64b9] https://www.youtube.com/user/InfowiseSolutions

The content of this email is confidential and intended for the recipient specified in this message only. It is strictly forbidden to share any part of this message with any third party, without a prior written consent of the sender. If you received this message by mistake, please reply to this message and promptly delete it. Thank you for your cooperation.


From: Ashlesha-MSFT @.> Sent: Tuesday, March 4, 2025 10:41 PM To: SharePoint/sp-dev-docs @.> Cc: Vladimir Gubler @.>; Mention @.> Subject: Re: [SharePoint/sp-dev-docs] "Add new item" for SharePoint lists broken in Teams (Issue #10135)

@vladigublerhttps://github.com/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!

โ€” Reply to this email directly, view it on GitHubhttps://github.com/SharePoint/sp-dev-docs/issues/10135#issuecomment-2699710939, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE3GZVP5UZ7YRAIQCGFXQX32SZW5LAVCNFSM6AAAAABYCXFE3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJZG4YTAOJTHE. You are receiving this because you were mentioned.Message ID: @.***>

[Ashlesha-MSFT]Ashlesha-MSFT left a comment (SharePoint/sp-dev-docs#10135)https://github.com/SharePoint/sp-dev-docs/issues/10135#issuecomment-2699710939

@vladigublerhttps://github.com/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!

โ€” Reply to this email directly, view it on GitHubhttps://github.com/SharePoint/sp-dev-docs/issues/10135#issuecomment-2699710939, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE3GZVP5UZ7YRAIQCGFXQX32SZW5LAVCNFSM6AAAAABYCXFE3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJZG4YTAOJTHE. You are receiving this because you were mentioned.Message ID: @.***>

vladigubler avatar Sep 16 '26 14:09 vladigubler