Bug in SharePoint document library webpart when using one document set content type as option for new item

Daniël Pastoor 45 Reputation points
2024-12-02T09:02:20.5733333+00:00

We use a Document Library webpart on a sepperate page to have multiple webpart's on one page for multiple control. Now we have found something strange.

In our case we have 1 document set content type on root level for creating a item. And this work great when we add a item on the page of the Document Library. It shows the correct input fields and everything but when we try to use the add new button in the webpart on a other page then it shows the wrong input fields.

Good working form from the Document Library page self:

User's image

User's image

Not working form from the page where we use the webpart:

User's image

User's image

Document Library content type settings:

In the image bellow is the "Vergaderdossier" a Document Set and the others are documents

User's image

And after some digging we found that the Webpart calls the api when opening the new modal form for the content type "Vergaderdossier":

https://[tenant].sharepoint.com/sites/[site]/_api/web/GetListUsingPath(DecodedUrl=@a1)/RenderListDataAsStream?@a1=%27%2Fsites%2F[SITE]%2D5%2FVergaderingen%27&View=3853cfa8-4532-4adf-98da-785d791fff5a&TryNewExperienceSingle=TRUE

And this returns a JSON model with a list of new Client forms fields:

User's image

And after analyzing this data I made the assumption that the wepart is always using the first item in the list of new form items if I compare the fields what I see in the JSON model and in the Modal. So for this instances it is :"Agenda". But it needs to take the fields from the new item: "Vergaderdossier".

So it looks like there is something going wrong in the Default SharePoint Document Library webpart.

Can you maybe help me to discover if there is something I need to do to resolve this or is it just a bug in the webpart

Microsoft 365 and Office SharePoint For business Windows
{count} votes

Accepted answer
  1. Yanli Jiang - MSFT 31,596 Reputation points Microsoft External Staff
    2024-12-03T08:27:29.09+00:00

    Hi @Daniël Pastoor ,

    According to the information you provided, I made a test and the situation is the same as yours. I also did some research, but unfortunately, I didn't find a better workaround except editing it on the document library page. This should be by design. Thank you for finding this issue. We suggest you submit feedback on this issue. This is the best platform to let us hear from you and make our products and services better for you and others. Microsoft values its customer feedback and a lot of features have been developed and suggested by customers via feedback. Your feedback is also very important. Thank you for your help in improving the product experience.

    Good day!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.