.Net Managed Client Side Object Model for Project Online

The Project Server client-side object model implements common server functionality. The Project Server CSOM includes a Microsoft .NET CSOM and a JavaScript object model (JSOM). In addition, the CSOM includes an OData service that enables a REST interface. Microsoft.ProjectServer.Client namespace: CSOM can be accessed from on-premises Project Server installation and Project Online via Microsoft.Project.Server.Client namespace. It implements the key functionality for the major entities such as Task, Project, EnterpriseResource, andAssignment. It also takes in additional entities such as LookupTable, CustomField, EventHandler, WorkflowActivities, and QueueJob, which support other common Project Server functionality. The CSOM is an API that is built on top of the PSI; it does not replace the PSI or implement all of the PSI functionality. In CSOM extensions, the ProjectContext object provides the entry point to server content and functionality. The .NET CSOM uses the Microsoft.ProjectServer.Client.ProjectContext object to provide direct access to core Project Server objects in the current Project Web App site collection. Below is the list of ProjectContext properties that represent Project Server objects. You can use these objects to retrieve other Project Server entities. CustomFields EnterpriseProjectTypes EnterpriseResources EntityTypes EventHandlers Events LookupTables Phases Projects Stages WorkflowActivities WorkflowDesigner Steps for creating a CSOM project in Visual Studio: Step 1: To create a CSOM project in Visual Studio Copy the following assemblies from the %ProgramFiles%Common FilesMicrosoft SharedWeb Server Extensions15ISAPIfolder to your development computer: Microsoft.ProjectServer.Client.dll Microsoft.SharePoint.Client.dll Microsoft.SharePoint.Client.Runtime.dll .The Microsoft.ProjectServer.Client.dll assembly has dependencies on the related SharePoint assemblies. In Visual Studio, create a Console application and name the application, say CSOM_ForProjectOnline. In Solution Explorer, set references to the following assemblies: Microsoft.ProjectServer.Client.dll Microsoft.SharePoint.Client.dll Microsoft.SharePoint.Client.Runtime.dll In the Program.cs file, edit the using statements, as follows: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.ProjectServer.Client; using Microsoft.SharePoint.Client; using System.Security; Step 2: Get the Project Context The code uses the pwaPath, userName & passWord constant along with static ProjectContext object. class Program       {                         const string pwaPath = “https://ServerName/pwa”; //Change the path to your Project Web App instance const string userName = “LoginName@DomainName.com”; //PWA Username const string passWord = “password”; //PWA Password static ProjectContext projectContext; //Initialize the ProjectContext Object static void Main(string[] args) {                   }     } Add SharePointOnlineCredentials class which represents an object that provides credentials to access SharePoint Online resources. static void Main(string[] args)        {                   projectContext = new ProjectContext(pwaPath);                   SecureString securePassword = new SecureString();                   foreach (char c in passWord.ToCharArray())                   {                           securePassword.AppendChar(c);                   }                         projectContext.Credentials = new SharePointOnlineCredentials(userName,securePassword);  } Firstly, let’s take an example to get list of Published Projects: For this we create a new function ListPublishedProjects() and call it from main method as follows: private static void ListPublishedProjects()             { projectContext.Load(projectContext.Projects); //Load Project from PWA projectContext.ExecuteQuery(); Console.WriteLine(“nList of all Published Projects:n”); foreach (PublishedProject pubProj in projectContext.Projects) { Console.WriteLine(“nt{0}”, pubProj.Name); } Console.ReadLine(); PublishedProject class represents a project that is published on Project Server. Build and run the solution, and the output will be obtained on console as this:              Create New Project using CSOM: Add new method CreateNewProject() to your Console Application as follows: private static void CreateNewProject() { ProjectCreationInformation newProj = new ProjectCreationInformation(); newProj.Id = Guid.NewGuid(); newProj.Name = “Test Project”; newProj.Description = “This Project is created via CSOM”; newProj.Start = DateTime.Today.Date; newProj.EnterpriseProjectTypeId = new Guid(“09fa52b4-059b-4527-926e-99f9be96437a”);                         PublishedProject newPublishedProj = projectContext.Projects.Add(newProj); projectContext.Projects.Update(); projectContext.ExecuteQuery();   } Here ProjectCreationInformation class specifies the information that is required to create a project. Get list of Published Tasks of a Project using CSOM: Add new method GetTasksOfProject () to your Console Application as follows: private static void GetTasksOfProject() { projectContext.Load(projectContext.Projects); //Load Projects from PWA projectContext.ExecuteQuery(); Guid ProjectGuid = new Guid(“b7dfde50-7a2d-e611-9bf8-681729bb2204”); var project = projectContext.Projects.First(proj => proj.Id == ProjectGuid); //Here you can also use the property proj.Name projectContext.Load(project.Tasks); //Load Tasks of Project from PWA                         projectContext.ExecuteQuery(); Console.WriteLine(“Tasks:n”); foreach (PublishedTask task in project.Tasks) { Console.WriteLine(“nt{0}”, task.Name); } Console.ReadLine(); } Output is obtained on console: Create New Task using CSOM: Add new method CreateNewTask() to your Console Application as follows: private static void CreateNewTask() { Guid ProjectGuid = new Guid(“b7dfde50-7a2d-e611-9bf8-681729bb2204”); var Project = projectContext.Projects.GetByGuid(ProjectGuid); var draftProject = Project.CheckOut(); TaskCreationInformation task = new TaskCreationInformation(); task.Id = Guid.NewGuid(); task.Name = “New Task”; task.Start = DateTime.Today.Date; task.IsManual = false; DraftTask draftTask = draftProject.Tasks.Add(task); draftProject.Update(); draftProject.Publish(true); //Publish and check-in the Project projectContext.ExecuteQuery(); } Here TaskCreationInformation class specifies the information that is required to create a task. Update Project Level Custom Field using CSOM: Add new method UpdateProjectCF() to your Console Application as follows: private static void UpdateProjectCF() { Guid CustomFieldGuid =new Guid(“99072634-db70-e611-80cb-00155da46e22”);             Guid ProjectGuid = new Guid(“3531cb1f-51ce-4a27-a45a-590339b99aed”); var proj = projectContext.Projects.GetByGuid(ProjectGuid); var draftProj = proj.CheckOut(); projectContext.Load(projectContext.CustomFields); //Load Custom Fields from PWA projectContext.ExecuteQuery(); var CustomField = projectContext.CustomFields.First(CF => CF.Id == CustomFieldGuid); //Here you can also use the property CF.Name var CustomFieldValue= “New Value”; string internalName = CustomField.InternalName.ToString(); //Get internal name of      custom field draftProj.SetCustomFieldValue(internalName, CustomFieldValue); //Set custom field value draftProj.Publish(true); //Publish and check-in the Project projectContext.ExecuteQuery(); } Here customField.InternalName is the internal name of the custom field, reserved for internal use. In this code, internalName will be “Custom_99072634db70e61180cb00155da46e22”. And the method draftProject.SetCustomFieldValue(internalName, CustomFieldValue) which sets a custom field on the project where CustomFieldValueis the value to be updated for the custom field. Update Task Level Custom Field using CSOM: Add new method UpdateProjectCF() to your Console Application as follows: private static void UpdateTaskCF() { projectContext.Load(projectContext.Projects);//Load Projects from PWA             projectContext.ExecuteQuery(); projectContext.Load(projectContext.CustomFields);//Load Custom Fields from PWA projectContext.ExecuteQuery(); Guid ProjectGuid = new Guid(“3531cb1f-51ce-4a27-a45a-590339b99aed”); Guid TaskGuid = new Guid(“56b0ba40-da78-e611-80cb-00155da4672c”); Guid CustomFieldGuid = new Guid(“3c3dfd8b-da78-e611-80cb-00155da4672c”); var project = projectContext.Projects.GetByGuid(ProjectGuid); DraftProject draftProject = project.CheckOut(); //CheckOut Project to make it  editable             projectContext.Load(draftProject.Tasks);//Load tasks of Project projectContext.ExecuteQuery(); var taskToEdit = draftProject.Tasks.First(task => task.Id == TaskGuid);//Get the task to be updated, Here you can also use the property task.Name             var CustomField = projectContext.CustomFields.First(CF => CF.Id == CustomFieldGuid); var CustomFieldValue = “New Value”; string internalName = CustomField.InternalName.ToString();//Get internal name of custom field             taskToEdit[internalName] = CustomFieldValue;//Set custom field value draftProject.Publish(true);//Publish and Check-in the project projectContext.ExecuteQuery(); } Hope you find this information helpful. In my upcoming blog,

How to configure Project Server default reporting

This post is about how to configure Project Server 2013 default reporting service. Project Server 2013 on premise have Business Intelligence Center into each instance of Project Web App, which provides Out-of-box report for Project Server. There are a few configurations required to run these reports. Here, I am going to show the configurations to run these reports. In the left Navigation of PWA (Project Web App), there is a link for Report Library that shows Project Server out of box reports. When I tried to run this report, I got the below shown error: After a research and few findings, I got it working; let’s see how. To run these reports, Excel Services and Secure Store Service are the prerequisites. Start the Excel Calculation Services service Go to Central Administration -> System Settings section -> click Manage services on server. Click the Server drop-down list, and then click Change Server and choose the appropriate server. Start Excel Calculation Services.  Create an Excel Services service application Go to Central Administrator -> Application Management -> Manage service applications Check Excel Service Application if its running or not. Create new Excel Service Application. Click New -> click Excel Services Application. Provide a name and select the Create new application pool option and type a name for the application pool in the text box. Select the Configurable option and provide the account name for running the application pool as shown below and Click OK. Add a trusted file location and data connection libraries Go to Central Administrator -> Application Management -> Manage service applications Click on Excel Services service application that we created in the step above. Doing so will open up the page below: Click on Trusted File Locations, Add the location of Report Library from PWA Instance as shown Below and also check Trusted Children checkbox while adding Trusted File Locations –       Location will be the url of your report Library in Project Web App Click on Trusted Data Connection Libraries, and add the location of data connection library from PWA Instance as shown below: Start Secure Store Service Go to Central Administration -> System Settings section -> click Manage services on server. Click the Server drop-down list, and then click Change Server and choose the appropriate server. Start Secure Store Service. Start Secure Store Service Application Go to Central Administrator -> Application Management -> Manage service applications. Create New -> Secure Store Service. Click on Secure Store Service that we created; this will show a message to add a new target application as shown below Important: The sample reports included with each instance of Project Web App are configured to use a Secure Store target application called ProjectServerApplication. You must create this target application for the sample reports to work. Create a new target application Enter Target Application ID as “ProjectServerApplication” Enter Display Name box, and type a name for the Secure Store Target Application. In the Contact Email box, type an email address. From the Target Application Type drop-down list, select Group. Click Next. On the ‘specify the credential fields for your Secure Store Target Application’ page, click Next. On the ‘specify the membership settings’ page, perform the following steps: In the Target Application Administrators box, type the name of the user who will administer this target application. In the Members box, type the name of the domain group you created for report viewers. Click OK. On the Secure Store Service Application page, select the check box for the target application that you just created. On the ribbon in the Credentials section, click Set. In the Set Credentials for Secure Store Target Application (Group) dialog box, type the user name and password of the account you created for the secure store target application. Now run the reports from Project Web App, and there you are!

SharePoint 2016 & Project Server install for single server setup

SharePoint 2016 and Project Server 2016 installation: For small production environment using single server farm

In a traditional farm topology SharePoint, the common architecture in small and medium-sized environments is the two-tier design. This design utilizes two servers: one for the web front-end and application services and the other for database services with separate Active Directory Server. Now with SharePoint 2016, we have – MinRole, which is very similar to the other topology designs that we have been using with SharePoint 2013. We will discuss more about MinRoles while we install the same. [ Empower executives and employees across your organization to connect, converse, discover and work together at one central location to save time, increase productivity and boost engagement ] Here, we are installing SharePoint server 2016 along with Project server 2016 in a single server farm environment, where we have separate Active Directory and separate SQL Database server that is well suited for any small or medium-sized environments. Before proceeding to install SharePoint server 2016, we need to make sure our environment meets all of the pre-required configuration. MORE RELATED ARTICLES HOW TO EXPORT AN OUT OF THE BOX (OOTB) LIST VIEW WEB PART IN SHAREPOINT HOW TO DEVELOP & BIND CUSTOM TEMPLATE WITH CUSTOM CONTENT TYPE IN SHAREPOINT Software and Hardware Requirements- Along with the above requirements, Microsoft SharePoint products also require to install the following on a server farm: o Windows Management Framework version 3.0 o Application Server Role o Web Server (IIS) Role o Microsoft .NET Framework 4.5.2 o Update for .NET Framework 4(KB2898850) o SQL Server 2012 Service Pack 1 Native Client o Microsoft Identity Extensions o Microsoft Sync Framework Runtime v1.0 SP1 (x64) o Windows Server AppFabric 1.1 o Windows Identity Foundation v1.1 o Microsoft Information Protection and Control Client (MSIPC) o Microsoft WCF Data Services Service Account Requirement: Account Account Name and Purpose Requirements Server farm account or database access account We are using the username – SPAdmin The server farm account is used to perform the following tasks: SharePoint Products Configuration Wizard Configure and manage the server farm. Act as the application pool identity for the SharePoint Central Administration website. Domain user account Member of the local administrators group on each server. SQL Server login on the computer that runs SQL Server. Additional permissions are automatically granted for the server farm account on Web servers and application servers that are joined to a server farm. The server farm account is automatically added as a SQL Server login on the computer that runs SQL Server. The account is added to the following SQL Server security roles: dbcreator fixed server role securityadmin fixed server role db_owner fixed database role for all SharePoint databases in the server farm Install SharePoint prerequisites:  • Login into the server with SPAdmin user. • Download and install SharePoint prerequisites from the SharePoint 2016 setup. • Run the setup as administrator, and choose install software pre-requisites. • Click on Next. On the next window, select “I accept the terms…” and click on Next. • Click on Finish to restart. After restarting, the pre-requisite tool will resume with the remaining installation. • After the installation is completed, the summary screen will show the status as below: • Click onFinish • Click on Install SharePoint Server. • Enter the Product Key and click on Continue • Click on “I accept the terms…” and click on Next • Choose the file location where you want to put your SharePoint configuration file. • Once the installation is done, click on Closeto start the configuration wizard. • When the SharePoint is installed, you will automatically be prompted to run the SharePoint 2016 Products Configuration Wizard, click on Next. • Choose Yes to restart the services and continue with the configuration wizard. • Select Create a new server farm option, and click Next. • On the next page, enter the configuration database name, database server name and user account details and click Next. Now you will get a new specific server role wizard which is also known as ‘MinRole’. In the earlier version of SharePoint, for a large SharePoint deployment plan, you needed to install SharePoint services with specific roles. For example, if you wanted all your end user requests to be placed on one server, then Web Front-End (WFE) server was used to handle your end user requests and similarly for the APP server, Search server, and Cache server. This complete process was quite complex and time taking. Now, you no longer have to worry about the services which should be started on which servers. By deploying your farm in a recommended MinRole topology, you can focus on what functionalities are needed to be enabled in your farm and let SharePoint take care of the rest. SharePoint 2016 server have six server roles as following: • Front-end: Services and components that serve for end user request are placed on web front end roles. • Application: Services and component that serve backend request like search crawl request are placed on application roles. • Distributed Cache: This role is assigned to servers to load balance end user requests among the front ends. • Search: This role is for services and components that are responsible for search indexing and crawling. • Custom: This role is reserved for services that needed to be isolated from other 3rd party application services. • Single-server farm: It doesn’t include SQL Server express. It includes all service application, services and components required for a single server farm. It is meant for the development, testing or small production environment. The first five roles are for multi-server farm environment and the last role is for a single server farm. Please note that while you select ‘Minrole’, either it would be a multiple server farm or a single server farm. If you are selecting a single server role here, then you will not be able to extend it into multiple server farm in future. Specify a port number for the Central Admin or you can use the default one. Also select the NTLM installation mode at this point, and press Next. • This wizard would take 20

Top seven new features of Microsoft Project 2016

For business owners and project managers, Project 2016 is a host of features to help them plan projects and collaborate with project stakeholders from virtually anywhere. It helps the team stay organised, keeps projects on track and provides an end-to-end experience for managing and optimizing resource utilization. In addition to these essential features, there are several improvements and new features to help your organization be more efficient, such as improved timelines, Tell Me integration and full support for Office add-ins. Let’s explore the top seven features that help business owners and project managers increase productivity within their organizations: Architectural improvements in Project 2016 The major architectural impact of Project 2016 is the complete integration into SharePoint 2016. Project Server 2016 runs as a service application in SharePoint Server 2016. As a result, administrators do not need to install Project Server 2016 separately, but instead, simply create and enable the Project Server Service Application from SharePoint 2016. The architecture diagram below shows Project 2016 as a Service of SharePoint 2016. Data consolidation with SharePoint In continuation with the architectural change, Project Server data has now been consolidated to the SharePoint database. There is no longer a separate database to maintain with Project Server 2016. Everything is consolidated in SharePoint content database. This can be better explained by the images below: From these improvements, as discussed above, the overall administration of the Project Server now gets simplified with no need of performing two separate installations and manage a separate database for PWA. This reduces IT overhead and improves the backup and restore process. MORE INTERESTING ARTICLES: HOW TO ENSURE EFFECTIVE DEMAND MANAGEMENT WITH PROJECT ONLINE LEVERAGING AUTOMATED WORKFLOW TO STREAMLINE PROJECT PROCESSES Multiple visual timelines In Project 2010 and 2013, users were able to visualize the project plan and its progress along the time axis called the Timeline. The timeline look and feel can be customized with few easy clicks and quickly shared via emails, presentation, etc., without exporting the entire plan. In Project 2016, users now have separate timeline bars for important summary tasks or deliverables. Multiple timeline bars can easily be added to Project Online as well. All you need to do is follow some simple steps: – Edit your project in Project Online via a web browser. – Click the existing timeline bar. – The TIMELINE ribbon actions will appear. Click on Add. Now the users are able to add as many Timeline bars as you need. Don’t be afraid to differentiate your Timeline with contrasting font and bar colors. Resource engagement request Another new and the most requested feature in Project 2016 is Resource Engagement requests. When Project Managers add an Engagement, the request is routed to the Resource Manager. Resource Managers are able to view quickly all of the requests and determine which requests to approve or reject.  Whether organizations make Engagement requests of generic resources or named individuals, this significantly simplifies and tracks the communication between Project Managers and Resource Managers about resource assignments. Matrix organizations should be very happy. Resource heatmap view The resource heatmap is a tabular display of resource allocation data, which helps resource managers to quickly view committed and proposed resource allocations highlighting over and under allocations. Users can choose the percentage of the over and under allocation to highlight as red (over) and blue (under). Coupled with the Engagement request, the heatmap simplifies the job of balancing resources with a highlighted view to show where actions are required. Project unique ID Through Project Professional 2013, the project was uniquely identified by the Project Name while the project server database maintained a project GUID. To establish an easily referable ID, organizations have created scripts and other custom code to auto-generate an ID to be paired with the project names. Now Project Online enables an admin configurable auto-generating code pattern to be defined as a part of the Enterprise Project Template (EPT). Projects will automatically receive a unique Project ID based on this configuration. Note: This feature is only available with Project Online. Other API enhancements The two new API enhancements enable greater interaction and create more parity between the APIs and UI of Project Online. UpdateCustomFields is used to bulk update project custom fields and CreateProjectSite is used to create a project team site. These APIs can be used in workflows and offer significant performance improvements. For example, use the CreateProjectSite API after the first publish, postponing the project site creation and significantly improving the performance of creating a project. Also, you can now choose which projects to create team sites and which not. Advaiya, a Microsoft partner for Project and Portfolio Management (Silver), with its 10+ years of experience in developing enterprise class business productivity solutions, can help you streamline your operations and get real-time visibility into the status of projects, clients, and key milestones, improving work collaboration across geographically separated teams. Planning to upgrade to Project 2016 and want to know more about this latest release – attend the webinar Top seven features added in Microsoft Project 2016 on August 25, 2016, 10 AM PT to explore more and learn how to harness the power of this new upgrade. Swati Solutions Architect & COE lead Advaiya Solutions Inc Udaipur, Rajasthan, India TALK TO OUR EXPERT! CALL NOW CALL NOW

What’s new in the July release of QuickProject

  In the blog Project management on the go with QuickProject, we talked about our QuickProject App for Microsoft Project Server. We have been continuously working on it to make it more user friendly and efficient. In the same effort, we have released a newer version of QuickProject App with improved user interface and updated details for assignments and projects. Download the app now:   Here is a quick highlight of the new features: The improved design for timesheet gives a better experience to users when filling and submitting the timesheet. It has two separate views for timesheet – full timesheet view and planned assignments timesheet view. Users can now group assignments by projects, and filter to view only planned tasks in the timesheet.   Logging administrative task is enabled now.   Users can now filter their assignments using a time duration filter. Assignments and milestones lists now have more information as – Percent Complete, Baseline Work and Team Members. From previous version of the application, “Mark as Complete” feature on assignment list has been replaced with “Percent Complete”. All these new features in QuickProject leads to improved performance and make it a perfect mobile solution for managing projects in Microsoft Project Server and Project Online, anywhere anytime.

Migration from Project Server 2007 to Project Server 2013

Recently, for one of our clients, we migrated Project Server 2007 to Project Server 2013. The client had been using Project Server 2007 since past four years, but was looking for an upgrade to experience extensive capabilities and new features of Project Server 2013. There is no direct method to migrate from Project Server 2007 to Project Server 2013. You have to first migrate to Project Server 2010 and via that you can upgrade to Project Server 2013 through database migration. Migration prerequisites Project Sever 2007, SharePoint 2007 and SQL Server 2005 should be updated to the latest available service packs. If they are not already installed, first install the service packs. Install new fresh hardware for Project Server 2010 and Project Server 2013 with latest service packs. Steps to be performed on Project Server 2007 Open SharePoint Central Administration, navigate to Project Server Service application page and find the archive, draft, published, reporting and SharePoint content database for the PWA site to be migrated, and make a note of it. Open SQL Server and take a backup of these five databases – archive, draft, published, reporting and SharePoint content database, and save it in a folder in a hard drive. Copy the saved backup files and save it in 2010 database server. Steps to be performed on Project Server 2010 Restore the five databases in SQL 2008 server. Mount the SharePoint content database using SharePoint Management Shell script. Example : Mount-SPContentDatabase -Name -WebApplication Create the PWA site using SharePoint Management Shell script. Example : New-SPProjectWebInstance -Url http://<2007ApplicationServerName>/pwa -AdminAccount “” -PrimaryDbserver “<2007DatabaseServerName>” -PublishedDbname “” -ArchiveDbname “” -DraftDbname “” -ReportingDbserver “<2007DatabaseServerName>” -ReportingDbname “” PWA Site is now created. You can see the home page. Turn off backward compatibility mode in Project Server 2010 from Project Server 2010 home page. Click Server Settings on the Server Settings page, in the Operational Policies section, and click Additional Settings. On the Additional Settings page, in the Project 2007 Compatibility Mode section, clear the Enable Project 2007 Compatibility Mode check box and click OK. Bulk update the project sites so that all issues and risks are created in 2010. Test and verify if all data is correctly migrated. Also, create new projects to check if they are correctly created. Take a backup of the five databases – archive, draft, published, reporting and SharePoint content database for migration to 2013 and save it in a hard disk. Steps to be performed on Project Server 2013 Restore five databases in SQL 2012 server. Test the content database using SharePoint Management Shell script. Example: Test-SPContentDatabase -Name –WebApplication http://<2013ApplicationServerName>/ Once successfully run, mount the database using SharePoint Management Shell script. Example: Mount-SPContentDatabase –WebApplication http://<2013ApplicationServerName> –NoB2BSiteUpgrade Make your account the secondary owner of the PWA Site using SharePoint Management Shell script. Example: Set-SPSite -Identity http://<2013ApplicationServerName>/pwa -SecondaryOwnerAlias “” If you are migrating Project Server 2010 users who were using Windows Classic authentication over to claims-based authentication, you will need to run the following SharePoint Management Shell script. Without running this script, users will not be able to log on to Project Web App after upgrade. Example: (Get-SPWebApplication http://<2013ApplicationServerName>).migrateUsers($true) Check your PWA Site collection using SharePoint Management Shell script for problems that can cause upgrade failure. Example: Test-SPSite –Identity http://<2013ApplicationServerName>/pwa Upgrade the Project Web App site using below SharePoint Management Shell script. Example: Upgrade-SPSite -Identity http://<2013ApplicationServerName>/pwa –VersionUpgrade Consolidate your Project Server 2010 databases to a Project Web App database. Example: ConvertTo-SPProjectDatabase -WebApplication http://<2013ApplicationServerName> -dbserver <2013DATABASESERVERNAME> -ArchiveDBName -DraftDBName -PublishedDBName -ReportingDBName -ProjectServiceDBName <2013DatabaseName> Attach the Project Services database to the web application using SharePoint Management Shell script. Example: Mount-SPProjectDatabase –Name <2013DatabaseName> –WebApplication http://<2013ApplicationServerName> Check your Project Web App database for problems occurring to cause upgrade to fail using SharePoint Management Shell script. Example: Test-SPProjectDatabase –Name <2013DatabaseName> Upgrade the Project Web App database using SharePoint Management Shell script. Example: Upgrade-SPProjectDatabase -Name <2013DatabaseName> -WebApplication Mount the Project Web App instance using SharePoint Management Shell script. Example: Mount-SPProjectWebInstance –DatabaseName <2013DatabaseName> -SiteCollection Check the Project Web App instance for any problem occurring to cause upgrade failure using SharePoint Management Shell script. Example: Test-SPProjectWebInstance –Identity Use the below SharePoint Management Shell script to get results of the health check in notepad to get more detailed and helpful information. Test-SPProjectWebInstance –Identity/pwa | Format-Table -Wrap -AutoSize | Out-File -FilePath c:output.txt Upgrade the Project Web App instance using SharePoint Management Shell script. Example: Upgrade-SPProjectWebInstance -Identity Enable Project Web App features using SharePoint Management Shell script. Example: Enable-SPFeature -Identity pwasite –URL http://<2013ApplicationServerName>/pwa Bulk update all sites to get issues, risks and documents restored. Check with the previous environment and verify if there is any inconsistency in data.

Critical Path Method: Some rudimentary knowledge

What is the roadmap to follow to ensure a project schedule will be successful or not? How would we be able to deliver it on time? These are some questions that project managers usually ask themselves. Well, the answer is ‘Critical Path Method’ — any organization which can successfully manage all the activities on the critical path can deliver the project on time. If we go by the Project Management Book of Knowledge (PMBOK) 5.0, critical path can be defined as “a sequence of activities that represents the longest path through a project, and determines the shortest possible duration.”  Activities or tasks on this path have to be dealt with the utmost urgency to smoothly run your project. If the schedule goes wrong for the activities on this chain of activities, your project is doomed to be delayed and potential risks will become issues, and change requests will be needed. Want to know more about critical path and how you can see it using MS Project? Learn more about the critical path and how Microsoft Project helps, in this webinar on Using Microsoft Project to determine where projects lie in relation to the critical path” on April 20, 2016 by Darrin Lange, director of operations and project management at Advaiya. Determining critical path tasks is a one step process in Microsoft Project, where you enter your tasks and establish predecessors and duration. The following processes and tasks establish the critical path, which play an important role in determining and monitoring the project. Forward Pass: A process of using a fixed project start date and activity duration to calculating the early start and early finish dates for all of the activities along a chain or path. This includes both the critical path and non-critical paths. Backward Pass: A process of using either a fixed end date or the end date determined by the forward pass and activities during to calculating the late start and late finish for all activities along a chain or path. Total Float: It is the amount of time by which an activity may be delayed from its early start without delaying the project finish date. Float can change as the project progresses and changes are made to the project plan. Also known as total slack or path float. Free Float: It is the amount of time by which an activity can be delayed without delaying the early start of any immediately following activities. For a rudimentary use of critical path method, the following are some essential requirements to be fulfilled: List of activities (also known as your WBS) Duration required for task completion The dependency between predecessors and successor activities  Rational endpoints like milestones, deliverables or the project Knowing your critical path activities well can ensure, not only project completion on-time, but the most effective type of risk mitigation, successful escalation negotiation with resource managers and more effective status reports to your sponsor.

How to create timeline chart in SSRS report

Timeline chart can be very helpful to present what is happening during a specific time frame, enabling a clear visualization of all running background jobs. In SQL Server Reporting Services (SSRS), there is no direct control available for creating a time line chart. For example, if we have a SharePoint list that stores seminars going to happen this year, we can display this information using a timeline chart in SSRS report. There can be multiple approaches to create a timeline chart. Here I am sharing the approach that is very easy to use. We will be creating an SSRS report for Project Server data. As the project will have multiple milestones, so we can create a timeline chart that will display all milestones between project start and finish date. Below is a step by step procedure to create the chart: 1. Create a report server project and a new Report “Timeline.rdl” as shown below. 2. Create connection to an instance of SQL Server within the report, and create a new Data Source. 3. Create a store procedure that will retrieve milestones from Project Server for a selected project. Have Project Name as filter  To show milestone in different levels in timeline chart, apply logic for even/odd row based on row number. All the records in an even row will be displayed at one level and odd rows will be displayed in the other level in timeline chart through below query: Case MilestoneName when ‘Start’  then ‘0’ when ‘End’ then ‘0’   else   ROW_NUMBER() over(order by MilestoneDate)%2 + 2  end as evenodd In the above query, MilestoneDate represents TaskStartDate of milestone. Output of this store procedure will be as follows: MilestoneDate for Start and End MilestoneName represents “ProjectStartDate and ProjectFinishDate” Now we are ready to create the chart. Go to report design and right click on report area. Select Insert -> Chart Select Category Groups as MilestoneDate and Values as Sum(evenOdd)     Modify the Category group Label to show the date in “dd/mm/yyyy” using expression =Microsoft.VisualBasic.Strings.format(Fields!MilestoneDate.Value, “dd/MM/yyyy”) Remove Chart Title, Axis Title, Legend   Enable Show Data Label in chart and modify the series label property to show Milestone Name   Modify the Horizontal Axis property Major Tick Marks   Modify horizontal axis property Axis Type, and disable side margins. . Modify horizontal axis property Line and make the Label Font bold.   Now select the Bar and go to the property window by pressing F4 and set properties as shown below:   Hide vertical axis and run the chart report, timeline chart will be displayed as shown below:     Conclusion:     This timeline chart can be exported in PDF and shared across the team.  Similar approach can be used to represent seminars within the years or any scenario.  

Add custom validations to JS Grid in Project Server

In Project Server and SharePoint, we commonly use JS Grid control to display the tabular data in grid view. If you are using Project Server, then you must have seen that JS Grid is used on most of the out of the box available web parts. JS Grid also provides flexibility to carry out customization using its available APIs. In one of the projects, there was a requirement to validate actual start date of the assignments of logged in user for My Task Web part. This implementation called for a custom solution. Here’s a solution in which we have to validate if task Actual start date is null i.e. task not yet started, then Task Start Date must be later than or equal to current date.  If the validation rule fails, then we need to highlight those task rows. The implementation steps for the solution are as follows: Create a SharePoint page and add My Task Web Part on it. To carry out custom validation on the JS Grid, we have to create a JavaScript file to add custom code, upload it on a SharePoint document library and add it on the SharePoint page created above using a content editor web part. Now, let’s take a look at various JS grid methods used. a. Get the instance of MY Task Grid Each of the JS Grid Instance available out of the box has its predefined name.  When My Task Web part is added on a page, we get the component name as “MyTasksComponent” and we can use below code to get its instance on the page: _grid = MyTasksComponent.get_GridSatellite().GetJsGridControlInstance(); b. Get the list of all Records of My Task Grid To apply validation rule when page loads, we have to retrieve all JS Grid records using below code:  allRecords = MyTasksComponent.get_GridSatellite().get_tableCache().GetRecords(ranges).records[0] The rangesvariable contain the start and end value to fetch the records.  ranges = [{pos: 0, count:             MyTasksComponent.get_GridSatellite().get_tableCache().GetRecordCount()}]; MyTasksComponent.get_GridSatellite().get_tableCache().GetRecordCount() gives the count of total records in the grid. c. Set the indicator for error on JS Grid row _grid.SetRowError(allRecords[index].recordKey, “Custom Validation Message”); After loading sp.js file on page, the custom JavaScript code runs which parse all MY Task JS grid and check Task Start date and Actual Start date value and highlight all the rows which fails the validation rule. Let’s say the current date is 31 Jan 2016, then you can see that there are two tasks which are not yet started i.e. Actual start date is null and Task Start date has passed out as highlighted. When you click on the indicator then the custom messages will be visible. The complete JavaScript code is here. ExecuteOrDelayUntilScriptLoaded(TaskGridLoad, “sp.js”); function TaskGridLoad() { try { if (typeof(MyTasksComponent) === “undefined”) { return; } if (window.PJ == null || MyTasksComponent == null) { return; } else { _grid = MyTasksComponent.get_GridSatellite().GetJsGridControlInstance(); var ranges = [{ pos: 0, count: MyTasksComponent.get_GridSatellite().get_tableCache().GetRecordCount() }]; var allRecords = MyTasksComponent.get_GridSatellite().get_tableCache().GetRecords(ranges).records[0]; var today = new Date(); var currentDate = new Date(today.getMonth() + 1 + “/” + today.getDate() + “/” + today.getFullYear()); //Iterate through all records to check for the validation rule for (var index = 0; index < allRecords.length; index++) { var AssgnStartDate = allRecords[index].properties[“ASSN_START_DATE”].localizedValue var AssgnActualStartDate = allRecords[index].properties[“ASSN_ACT_START”].localizedValue var assnStartDate = null; if (AssgnActualStartDate == null || AssgnActualStartDate == undefined) { if (AssgnStartDate != null || AssgnStartDate != undefined) { assnStartDate = new Date(AssgnStartDate); } if (assnStartDate < currentDate) { _grid.SetRowError(allRecords[index].recordKey, “Start Date should be later or equal to current date”); } } } } } catch (err) { alert (err.Message); } }  Conclusion: As we have seen how to validate task rows with custom validation rules, similarly we can carry out any of our custom validations like validating actual and planned hours, or any enterprise task level custom fields value, on various events of JS grid.