Tuesday 25 December 2018

Working with Office365 Project Online Tasks using JSOM - Part II

In this article, let us look at updating or deleting tasks on Office 365 project online using JavaScript Object Model.

This article series focuses on working with office 365 project online plan schedule tasks using JSOM approach. The previous article explains creating or retrieving tasks on project online schedules using JSOM approach.


Update Task on Project Schedule 


To update a task on the project online, the following operations are performed.
  • Check-out a project – This operation involves get project by GUID and check-out. (If already checked out, this step is not required) 
  • Update task (OOB/custom fields can be updated) - This operation involves steps like get project by GUID, then get the project draft, get the task collection from the project draft, get task using task GUID, set necessary fields (OOB or custom) with values and updating project draft. 
  • Publish & check-in the project. - This operation involves get project by GUID, get the project draft, publish/check-in the project. (If other actions are involved, this step is not required)

Saturday 22 December 2018

Working with Office365 Project Online Tasks using JSOM - Part I

This article series focuses on working with office 365 project online plan schedule tasks using JSOM approach. The operations like create, retrieve, update or delete project task operations are explained.

Here in this article, let us look at creating or retrieving project schedule tasks using JSOM approach. 

Office 365 Microsoft Project Online helps creating project plans, managing schedules and collaborating with other resources virtually. Project plans, task schedules and other objects on the Microsoft Project online can be accessed or created or updated programmatically. Microsoft documentation site  provides REST endpoints for working with project online objects. 


Load prerequisite files and context: 


To get the project server context working, first let us see the prerequisite files to be loaded for getting the project online contexts. The following piece of code shows how the required Project Server/SharePoint files and contexts (PS/SP) are loaded. 


Monday 10 December 2018

Accessing Office 365 Project Web App Objects using REST API

This article describes accessing the objects present on the Office 365 project web app site collection using REST API.

PWA abbreviated as Project Web App, is available on Office 365, and it used for easily and efficiently planning projects, track status, and collaborate with other virtually. It is an application built on top of SharePoint, which has collaborating features. Any PWA site collection will have the project web app settings feature enabled on the site collection. To know more about PWA, refer to the official documentation available on the MSDN site.

Let us see the high level REST API (service end points), which can be used for accessing objects available on Office 365 PWA site collections.

Note: Replace the Office 365 PWA url with your respective URL.

To access the project server and list of available objects,
https://nakkeerann.sharepoint.com/sites/pwa/_api/ProjectServer

The REST APIs used for accessing objects available on the project servers are explained below.


Custom Fields:

The enterprise custom fields are created on the project plans for managing additional project attributes. The custom field can be at project or task level. The following API is used to access all the enterprise custom fields.
https://nakkeerann.sharepoint.com/sites/pwa/_api/ProjectServer/CustomFields

One specific field can be accessed using the field GUID:
https://nakkeerann.sharepoint.com/sites/pwa/_api/ProjectServer/CustomFields('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')