-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
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
- SPFx version 1.18.2
- Node.js version 18.17.1
Describe the bug / error
I`m using SPFx Form customizer to customize the SharePoint list form (https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-form-customizer).
In this case, SharePoint redirects me to the SPListForm.aspx page where I have a few parameters in the URL.
Now, I'm trying to use URL parameter env=Embedded as described here
https://learn.microsoft.com/en-us/microsoft-365/community/query-string-url-tricks-sharepoint-m365#put-nearly-anything-in-sharepoint-into-focused-mode.
And it shows me an error:

Details from the Network show more info:

After debugging of SharePoint scripts, I found out that it fails when trying to render Navigation (window.o365ShellLoadPromise is undefined, and it camsd somwhere from the logic that tries to render SuiteNav):

I think this is because the variable (_isSuiteNavDisabled) that responds to running this code returns false.

And here is the method (I suppose) that sets it

If I manually, during debugging, set _isSuiteNavDisabled to true, then the form renders without errors.
I think this is a bug in a script on SPListForm.aspx because the param env=Embedded should render the form without any navigation and errors.
It would be good if someone could check this, because usage of env=Embedded is officially allowed and should work in such extensions as Form Customizer
Steps to reproduce
- Create SPFx with form customizer
- Upload it to SharePoint and try to redirect to e.g. NewForm.aspx with param env=Embedded in the URL (https://..../NewForm.aspx?env=Embedded)
- SharePoint will redirect to SPListForm.aspx, env=Embedded present in the URL.
- Error occurred.
Expected behavior
If env=Embedded used for the form customized with Form Customizer no error should occure on rendering the page