#ProjectOnline / #ProjectServer 2013 Access #SharePoint lists on PDPs #JavaScript #jQuery #Office365
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
A common requirement is to see and access the Issues and Risks lists on the Project Detail Pages in the PWA site for the associated project. Previously I wrote a script that displayed the Issue and Risks data in a table but this was read-only. This can be seen here: http://bit.ly/1ctq4xK
This new script will display the Issues and Risks (or any other list for that matter – slight code change / update required) on the PDP but will allow you to create / edit the lists items providing you have the permissions of course. Martin did something similar here. The script can be downloaded from the script gallery below:
To get the script to work you will need to download the following jQuery library: jquery-2.1.1.min.js – jQuery download Another version of this library may work but this was the one I used / tested with. Upload this library to your PWA site collection then update the script file with the correct location. I uploaded this file to the style library as you can see in the code below:
Alternatively you can reference a CDN if preferred.
Once the script is downloaded, upload this to the PWA site collection, in this example it was uploaded to the shared documents library. Choose what PDP you want the script to be accessed, in this example I created a PDP called SharePoint Data, added a content editor web part on the new page then referenced the uploaded script using the content editor web part:
Once loaded, the page will look like this:
Don’t worry about the message – this is because there is no project UID available here.
Add the new PDP to the require Enterprise Project Types then navigate to the Project Center and access one of those projects from that EPT. Click the new PDP and you should see:
Click one of the buttons and that list should load:
You can also change the behaviour of the list form and use modal pop ups for a better experience:
This currently includes Risks and Issues but can easily be updated to include other SharePoint lists.
The script is provided "As is" with no warranties etc.