Archive

Posts Tagged ‘Project Server’

Getting Starting with #ProjectOnline and #PowerApps #PVC18 presentation links #PPM #PMOT #Apps #Office365 #MSProject

Paul Mather
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)

Last week I had the pleasure of presenting at the awesome Project Virtual Conference 2018. During my session I referenced existing blog posts and code samples that I had previously published on my blog. As promised in the presentation, here is a blog post containing all of the relevant links to help get you started using PowerApps for Project Online. A link to my session is here: http://projectvirtualconference.com/sessions/getting-started-with-project-online-and-powerapps/

Firstly here is a link to the official PowerApps site: https://powerapps.microsoft.com/en-us/build-powerapps/

The first example app we looked at was a navigation PowerApp for Project Online, this made use of the SharePoint Online connector in PowerApps. As discussed, you would need a process to get the required Project Online data into the target SharePoint list for this approach. Here a link to an example solution starter PowerShell script that will do just that: https://pwmather.wordpress.com/2018/03/01/projectonline-powershell-to-keep-ppm-data-in-sync-on-sharepoint-list-pmot-o365/

Once the data is available, here are the two links that walkthrough creating this example navigation app:

Part 1: https://pwmather.wordpress.com/2018/02/21/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-part1/

Part 2: https://pwmather.wordpress.com/2018/02/24/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-sharepoint-part2/

The next example PowerApp we looked at in the presentation made use of the Project Online connector in PowerApps to give examples of using some of the actions available in the connector. This works directly with Project Online so does not require any background process to get data into SharePoint. As mentioned in the presentation, the properties available are fairly limited, hence for the navigation app I had to get the data from Project Online into SharePoint list first as I needed the Project Site URL which is not in the Project data set in the Project Online connector for PowerApps. This example app did make use of the Project Online connector in PowerApps: https://docs.microsoft.com/en-us/connectors/projectonline/

Here are the three links that walkthrough creating this example app:

Part 1: https://pwmather.wordpress.com/2018/03/14/projectonline-powerapps-using-the-project-online-connector-ppm-apps-msproject-o365-part1/

Part 2: https://pwmather.wordpress.com/2018/04/11/projectonline-powerapps-using-the-project-online-connector-ppm-apps-msproject-o365-part2/

Part 3: https://pwmather.wordpress.com/2018/04/26/projectonline-powerapps-using-the-project-online-connector-ppm-apps-msproject-o365-part3/

As mentioned in the presentation, you can create a PowerApp that make use of both the SharePoint connector and Project Online or any number of connectors available for PowerApps – there are lots!

PowerApps are a great way to build business applications without having to write any code!

Advertisements
Categories: Paul Mather, Work Tags:

#ProjectServer and #SharePoint 2013 / 2016 June 2018 Cumulative Update #PS2013 #SP2013 #PS2016 #SP2016 #MSProject

Paul Mather
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)

The Office 2016 June 2018 updates and cumulative updates are now available, please see the links below:

https://support.microsoft.com/en-us/kb/4299875

Project 2016 June 2018 update:
https://support.microsoft.com/en-us/kb/4022164

SharePoint Server 2016 / Project Server 2016 June 2018 update: 
https://support.microsoft.com/en-us/kb/4022173 & https://support.microsoft.com/en-us/kb/4022178

The Office 2013 June 2018 updates and cumulative updates are now available, please see the links below:

https://support.microsoft.com/en-us/kb/4299875

Project Server 2013 June 2018 CU Server Roll up package:
https://support.microsoft.com/en-us/kb/4022185

Project Server 2013 June 2018 update:
https://support.microsoft.com/en-us/kb/4022192

Project 2013 June 2018 update:
https://support.microsoft.com/en-us/kb/4022171

Also worth noting, if you haven’t done so already, install Service Pack 1 http://support2.microsoft.com/kb/2880556 first if installing the June 2018 CU for 2013.

As always, fully test these updates on a replica test environment before deploying to production.

Categories: Paul Mather, Work Tags:

#ProjectOnline : Add related projects to a custom field #JavaScript #jQuery #PPM #Office365 #PMOT #MSProject

Paul Mather
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)

This blog post follows on from my earlier blog post on updating Project Online project level custom fields from JavaScript using the REST API: https://pwmather.wordpress.com/2018/05/21/using-rest-in-javascript-to-update-projectonline-project-custom-fields-ppm-pmot-jquery-office365/

As mentioned in that post, I have published example code sample / solution starter that demonstrates updating a project level custom field using the REST API. This simple code sample runs from a Project Detail Page in the Project Web App site collection, it enables the user to add related projects to a project level custom field. As mentioned, it is a solution start to demonstrate the use of the Project Online REST APIs from JavaScript, so it wouldn’t be fit for production use as it would need some tweaks to manage things like displaying projects already added to the custom field pre-loaded in the related project list etc. The solution starter functionality can be seen below:

image

The solution starter code can be downloaded from the Microsoft Gallery here: https://gallery.technet.microsoft.com/Online-Add-Related-e6a69a02

Once downloaded, open the file to edit in your chosen editor (notepad will do if you have nothing else, I use Visual Studio Code or Notepad++). To get the solution starter code to work, you will need to update the custom field internal name for your target project level custom field, the code sample also assumes this target custom field is a text field. If the target field is a different type you will need to update the value type as mentioned in the first post.

Firstly, get the correct internal name for the custom field as seen below in this example:

image

This information is available using the CustomField API: {PWAUrl}/_api/ProjectServer/CustomFields

Now in the solution starter code, update the projectCFInternalName variable on line 61 as seen below with the correct guid:

image

Save the file and upload to a library in the PWA Site, for example mine is uploaded to the Site Assets library. Then add a Content Editor Web Part to the target Project Detail Page in PWA, edit that new web part:

image

In the content link, put a link into the JavaScript file, in my example the link is /sites/pwa/SiteAssets/PWARelatedProject.js. Expand Appearance, give it a title and change the Chrome Type to None. Click Apply then click OK and stop editing the page. Your page will then display the following (assuming you edited the web part from PWA Settings > Project Details Pages:

image

When accessed from a PDP linked to a project the following will display:

image

The list of projects are filtered to the list of projects the current user can access. Use the buttons to add the related project/s:

image

Then click Save:

image

Once the publish job has been sent to the queue for processing the modal will close. Viewing the custom field in the PDP will show the the projects added:

image

This is just a simple example to demonstrate updating project level custom fields using the REST API from a Project Detail Page. Update the solution starter to ensure the code is production ready and fully test on a DEV / TEST PWA instance first before using in Production. The script is provided "As is" with no warranties etc.

Categories: Paul Mather, Work Tags:

Using #REST in #JavaScript to update #ProjectOnline project custom fields #PPM #PMOT #jQuery #Office365

Paul Mather
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)

This blog post provides example code for updating Project Online project level custom fields using the REST API ({PWASite}/_api/ProjectServer) in JavaScript on a PWA page. Following this blog post later this week will be a full working code sample that will be available for download.

When updating a project programmatically you will still need to following the same steps you do when updating a project manually, check out, update, publish and check in. The code snippets below demonstrate these actions using the REST API in JavaScript for updating a project level custom field.

Firstly check out the project:

image

Here we are passing in the project GUID into the URL that we will call to check out the project using the jQuery ajax HTTP request. The check out method is detailed here: https://msdn.microsoft.com/en-us/office/project/api/publishedproject#CheckOut__ If successful we then call the updateProjectCF function:

image

Again, in here we are passing in the same project GUID into the URL to update the custom fields using the jQuery ajax HTTP request. This call is slightly more involved as we have to inform the API call what is being changed. This is done by passing that data to the API in the HTTP call. To update custom fields you have to specify the key, the value and value type. The key is the internal custom field name, an example seen below:

image

This information is available using the CustomField API: {PWAUrl}/_api/ProjectServer/CustomFields

The value is the data you want to add to the custom field, this example is just updating a free text (single line of text) field. The value type specifies the custom field data type that you are updating. These are all prefixed with Edm (Entity Data Model) then the the type such as String, Int32 or DataTime etc. The update custom field method is detailed here: https://msdn.microsoft.com/en-us/office/project/api/draftproject#UpdateCustomFields_Collection_SP.KeyValue__customFieldDictionary_ If successful we then call the publishcheckInProject function:

image

Similar to the first API call, we just pass in the same project GUID to the URL used then call to publish and check in the project using the jQuery ajax HTTP call. Specifying true with the publish call will check in the project. The publish method is detailed here: https://msdn.microsoft.com/en-us/office/project/api/draftproject#Publish_Boolean_checkIn_

As mentioned earlier on in the post, there will be a full working example / solution started published later this week.

Categories: Paul Mather, Work Tags:

#ProjectOnline time phased data rollup for #OData reporting note #PPM #PMOT #BI

Paul Mather
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)

Just a quick post to highlight a feature in Project Online when changing the rollup of timephased reporting data in Project Online as posted here:

https://pwmather.wordpress.com/2017/11/17/projectonline-time-phased-data-rollup-for-odata-reporting-ppm-pmot-bi-excel-powerbi/

As per the Microsoft support article below:

https://support.office.com/en-us/article/Configure-rollup-of-timephased-reporting-data-in-Project-Online-da8487fe-899e-4510-a264-e2ebc948928c

This mentions only the following endpoints in relation to this change:

image

You will also find that the ResourceDemandTimephasedDataSet endpoint is also impacted by this reporting setting if your projects are set to calculate the resource utilisation from the Project Plan / Project Plan Until. For example, if you have the timephased data setting set to Never as seen below and your projects resource utilisation is set to the Project Plan, the resource demand for those projects will not appear in the ResourceDemandTimephasedDataSet endpoint.

image

Just something to be aware of.

Categories: Paul Mather, Work Tags:

#ProjectServer and #SharePoint 2013 / 2016 May 2018 Cumulative Update #PS2013 #SP2013 #PS2016 #SP2016 #MSProject

Paul Mather
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)

The Office 2016 May 2018 updates and cumulative updates are now available, please see the links below:

https://support.microsoft.com/en-us/kb/4133083

Project 2016 May 2018 update:
https://support.microsoft.com/en-us/kb/4018373

SharePoint Server 2016 / Project Server 2016 May 2018 update: 
https://support.microsoft.com/en-us/kb/4018386 & https://support.microsoft.com/en-us/kb/4018381

The Office 2013 May 2018 updates and cumulative updates are now available, please see the links below:

https://support.microsoft.com/en-us/kb/4133083

Project Server 2013 May 2018 CU Server Roll up package:
https://support.microsoft.com/en-us/kb/4018395

Project Server 2013 May 2018 update:
https://support.microsoft.com/en-us/kb/4022130

Project 2013 May 2018 update:
https://support.microsoft.com/en-us/kb/4018379

Also worth noting, if you haven’t done so already, install Service Pack 1 http://support2.microsoft.com/kb/2880556 first if installing the May 2018 CU for 2013.

As always, fully test these updates on a replica test environment before deploying to production.

Categories: Paul Mather, Work Tags:

Change required for #SharePoint Online / #ProjectOnline REST API calls when using WebRequest #PowerShell #dotnet #office365dev

Paul Mather
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)

Just a quick blog post to highlight a change the is required when querying Project Online / SharePoint Online REST APIs in code when using the WebRequest class. Previously the PowerShell code sample below would work and authenticate with no issues:

#add SharePoint Online DLL - update the location if required
$programFiles = [environment]::getfolderpath("programfiles")
add-type -Path $programFiles'\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll'

#set the environment details
$PWAInstanceURL = "https://PWAURL"
$username = "username" 
$password = "password"
$securePass = ConvertTo-SecureString $password -AsPlainText -Force

#set the Odata URL with the correct project fields needed,
$url = $PWAInstanceURL + "/_api/ProjectData/Projects()?`$Filter=ProjectType ne 7&`$Select=ProjectId,ProjectName,ProjectPercentCompleted,ProjectOwnerName"

#get all of the data from the OData URL
[Microsoft.SharePoint.Client.SharePointOnlineCredentials]$spocreds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass)  
$webrequest = [System.Net.WebRequest]::Create($url)
$webrequest.Credentials = $spocreds
$webrequest.Accept = "application/json;odata=verbose"
$webrequest.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
$response = $webrequest.GetResponse()
$reader = New-Object System.IO.StreamReader $response.GetResponseStream()
$data = $reader.ReadToEnd()
$results = ConvertFrom-Json -InputObject $data
$results.d.results 

There has been a change in Office365 and this would now generate a 401 unauthorized error as seen below:

image

It is now required to use the authentication cookie, not sure if this is a permanent change or a temporary issue. Adding the line below resolves the issue:

$webrequest.Headers["Cookie"] = $spocreds.GetAuthenticationCookie($url)

#get all of the data from the OData URL
[Microsoft.SharePoint.Client.SharePointOnlineCredentials]$spocreds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass)  
$webrequest = [System.Net.WebRequest]::Create($url)
$webrequest.Credentials = $spocreds
$webrequest.Accept = "application/json;odata=verbose"
$webrequest.Headers["Cookie"] = $spocreds.GetAuthenticationCookie($url)
$webrequest.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
$response = $webrequest.GetResponse()

This change would be applicable to all of my PowerShell code samples that query the Project Online OData API found here: https://gallery.technet.microsoft.com/site/search?f%5B0%5D.Type=User&f%5B0%5D.Value=PWMather&sortBy=Date

Hope that helps

Categories: Paul Mather, Work Tags:
%d bloggers like this: