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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
// Load Prerequisite files and contexts | |
SP.SOD.executeFunc('sp.js', 'SP.Utilities.Utility.getLayoutsPageUrl', function(){ | |
SP.SOD.registerSod('SP.ClientContext', SP.Utilities.Utility.getLayoutsPageUrl('sp.js')); | |
SP.SOD.registerSod('PS.ProjectContext', SP.Utilities.Utility.getLayoutsPageUrl('ps.js')); | |
SP.SOD.loadMultiple(['SP.ClientContext', 'PS.ProjectContext'], function(){ | |
console.log("All prerequisites loaded"); | |
}); | |
}); | |
}); |