I have many data view web parts on a SharePoint Online Office 365 site. These generate lists of documents from multiple document libraries based on common meta data. The links on the lists worked fine up until December. This issue now is that the sites are using the modern PDF viewer.
The links that are generated use "action=default" to open the file. The Microsoft file types (word, etc.) are handled fine and open correctly. The PDF links now only take you to the folder where the file sits. They used to open fine, but it would seem that the way PDFs are handled to display in the modern PDF viewer does not work the way it used to.
I have tried Microsoft support to see if I could force the classic method of opening a PDF but they have told me it is not possible, and since I developed these web parts in SharePoint Designer they cannot support me.
So I have to rework my code in SharePoint Designer to match the URLs created by SharePoint to open PDFs.
What is the new format for the link? (i.e. what info do I need to build the link and what is the formula)
How can I get the code to check whether the file type is PDF or not and build the URL respectively?
Thanks in Advance!