Project Server 2013: Adding Project Site Button to Project Center – Customize Ribbon

Description: OOB we do not have “Project Site” Icon in Project Center compared to Project Server 2010 You can add a Button and get the same functionality by following the below steps   Steps :   1. Download the solution file from blog http://blogs.msdn.com/b/project_programmability/archive/2010/12/23/how-to-modify-the-ribbon-in-pwa.aspx2. Replace the second custom action with the below content :<CustomAction Id=”ProjectCenterPage.ProjectSiteIcon” Location=”CommandUI.Ribbon”>       …

0

Project Server 2013 Updating Task level Lookup based custom field Using CSOM

Below sample code is to update the task level Lookup table based custom fields for a given project:          try{                 projectName = “ProjectTest”;                pwapath = “http://Servername/pwa”;                              projContext = new ProjectContext(pwapath);                projContext.Load(projContext.Projects);                projContext.ExecuteQuery();                var proj = projContext.Projects.First(p => p.Name == projectName);                projContext.ExecuteQuery();                              var cfInternalName = “Custom_aaf4156c7804e511943500155d569905”;    //CustomField field uid without the “-” and…

0

Project Server CSOM -Select few columns from a dataset

Below sample code is to select only name and ID for a resource using CSOM using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Microsoft.ProjectServer.Client;using Microsoft.SharePoint.Client; namespace ReadResources{    class Program    {        private static ProjectContext projContext;                private const string pwapath = “http://servername/pwa/”;        static void Main(string[] args)        {            var resinfo =new EnterpriseResourceCreationInformation();            projContext = new ProjectContext(pwapath);            projContext.Load(projContext.EnterpriseResources, nm =>…

0

Deploy files to _layouts folder in SharePoint 2013 and provide anonymous access

Below Sample code is to provide anonymous access to Custom files deployed under _layouts folder using System;using Microsoft.SharePoint;using Microsoft.SharePoint.WebControls; namespace Help.Layouts.Feature{    public partial class Help : UnsecuredLayoutsPageBase    {        protected void Page_Load(object sender, EventArgs e)        {            string pagesource;            pagesource = Request.QueryString[“q”].ToString();            Response.Write(pagesource);             Response.Write(“<object id=\”embeddedhtml\” type=\”text/html\” data=\”http://servername/sample.txt\” width=\”100%\” height=\”100%\”></object>”);         }        protected override bool AllowAnonymousAccess {…

0

Project Server 2010: Read groups and display user groups

Below sample code is to read all the group members and display the group names where the mentioned User name is present: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Data; namespace CheckUserGroup{    class Program    {        static void Main(string[] args)        {            string resname = “User Name”;            Guid resguid = Guid.NewGuid();            bool found = false;            WebSvcSecurity.Security objSecurity =…

0

Creating a Project Server User and Adding User to a group through PSI

Introduction Below PSI sample code is to Create a user in Project server and Add the user to a specific Group Sample Code public static Guid CreatePsvrUser(string resname, string ntAcc)        {            Guid gpUID = new Guid(“303D8BA6-BD1A-437A-984E-B19AD11EF345”);    //group UID can be found from MSP_WEB_SECURITY_GROUPS            ResourceWS.Resource resourceClient = new ResourceWS.Resource();            resourceClient.Credentials = nc;            ResourceWS.ResourceDataSet resDs = new…

0

Understanding Project Mini Category and Managing Project Mini Category

Introduction on Project Mini Category Project Mini categories are Categories in Project Server Specific to a project in Project server Project Mini Category gets created when you define a Project Level Permission. Each project will have a Mini category and a Category Relation once you define permissions from Project Center (Project Permissions) Individual Users or…

0

How do we apply a custom filter on Project Center webpart Dynamically(usefull when added on a custom site….)

Welcome to First post …….. We can do a filtering(custom filter) on Project Center Dynamically. For instance Projet Center webpart is added on a Sitecolltion and while opening the site collection project Center should do a filtering based on a specific criteria 1. Sample code for extending Project Center is Available with SDK (CustomizeProjectCenter) 2. We…

0