Tags » Project Server 2010

Link a project site to a project using PSI

This code snippet will link an existing project site to a project. It uses the WebSvcInterop web service to accomplish that.


// Retrieve instance specific settings
ServiceWssInterop.WssSettingsDataSet dsCurrentWssInfo = serviceWssInterop.ReadWssSettings();
ServiceWssInterop.WssSettingsDataSet.WssAdminRow adminRow = dsCurrentWssInfo.WssAdmin[0];

// Retrieve the WssWebAppUid (needed to update a project site for a project)
Guid wssWebAppUid = adminRow.WADMIN_CURRENT_STS_SERVER_UID;

// Read the WSSInfo for the specified project
ServiceWssInterop.ProjectWSSInfoDataSet wssDataset = serviceWssInterop.ReadWssData(<ProjectUID>);

// Check if a project site already exists
if (wssDataset.Tables[0].Rows.Count == 0)
{ 
     // Project site does not exist yet
     serviceProject.UpdateProjectWorkspaceAddress(<ProjectUID>, <ProjectSiteUrl>, wssWebAppUid);
}
else
{
     // Project Site already exists
}
 
Project Server 2013

Wait for queue job using PSI

Following code snippet will wait for a specified queue job in the Project Server queue

private void WaitForQueue(SvcQueueSystem.QueueSystem q, Guid jobId)
{
     SvcQueueSystem.JobState jobState;
     const int QUEUE_WAIT_TIME = 2; // two seconds
     bool jobDone = false;
     string xmlError = string.Empty;
     int wait = 0;

     // Wait for the project to get through the queue. 108 more words
Project Server 2013

Add a task to a timesheet using PSI

Following code snippet will add an existing task to a timesheet

WebSvcTimeSheet.TimesheetDataSet dsTimeSheet = SvcTimeSheet.ReadTimeSheet(<TimesheetUID>);

WebSvcTimeSheet.TimesheetDataSet.LinesRow newLine = dsTimeSheet.Lines.NewLinesRow();

newLine.TS_LINE_UID = Guid.NewGuid();
newLine.TS_UID = <TimesheetUID>;
newLine.TS_LINE_CLASS_UID = TimesheetConst.const_StandardLineClassGuid;
newLine.TS_LINE_VALIDATION_TYPE = (byte)TimesheetEnum.ValidationType.Unverified;
newLine.TS_LINE_STATUS = (byte)TimesheetEnum.LineStatus.Approved;
newLine.PROJ_UID = <ProjectUID>;
newLine.TASK_UID = <TaskUID>;
newLine.TS_LINE_CACHED_ASSIGN_NAME = <Task Name>;
newLine.TS_LINE_CACHED_PROJ_NAME = <PROJ NAME>;
newLine.SetTS_LINE_COMMENTNull();

dsTimeSheet.Lines.AddLinesRow(newLine);

SvcTimeSheet.PrepareTimesheetLine(<TimesheetUID>, ref dsTimeSheet, new[] { newLine.TS_LINE_UID });

Guid jobUid = Guid.NewGuid();
SvcTimeSheet.QueueUpdateTimesheet(jobUid, <TimesheetUID>, dsTimeSheet);
Project Server 2013

Trick Your Reports to Show Certain Summary Tasks as Projects

Around here, we sometimes end up with projects/efforts that are really too small to each have their own project schedule – it would be silly to have 10 lines for a single effort in its own schedule, even if you were using master projects. 527 more words

Project Server 2010

Dealing with that "Wishy-Washy" Enterprise Global

I’m mostly stealing information that can be found in numerous articles around the intarwebs here, but I thought it might be nice to find all the information in one central location. 780 more words

Project Server 2010

#ProjectServer / #ProjectOnline custom PWA homepage #PS2013 #PS2010 #SharePoint #HTML #MSProject

This post covers an example landing page for PWA using HTML and an image. Firstly select your chosen image and add on containers, other images, text etc. 230 more words

Project Server