hello forum members,
does anyone knows which field in "Assignment" table in Project dataset belongs to a resource name assigned to a task?
below is my code and I see a guid added in "RES_UID_OWNER" AND "RES_UID", but when I open this project in Project Server or Project 2013 - I don't see resources assigned to a task.
Any help is appreciated.
backendProject.ProjectDataSet readProjDs = projectClient.ReadProjectEntities(projectUids, PROJECT_ENTITY_TYPE_TASK_AND_RESOURCE, backendProject.DataStoreEnum.WorkingStore);backendProject.ProjectDataSet.AssignmentRow newAssignmentRow = readProjDs.Assignment.NewAssignmentRow();
Guid RES_UID = new Guid("a153f98d-3b7e-e311-aa5f-0050569d03ac"); //get resource id
newAssignmentRow.ASSN_UID = Guid.NewGuid();
try
{
Guid newGuid = Guid.Parse(taskid);
Console.WriteLine("Converted {0} to a Guid", taskid);
newAssignmentRow.TASK_UID = newGuid; //get the task id
}
catch (ArgumentNullException)
{
Console.WriteLine("The string to be parsed is null.");
}
catch (FormatException)
{
Console.WriteLine("Bad format: {0}", taskid);
}
newAssignmentRow.PROJ_UID = projectUids;
newAssignmentRow.RES_UID = RES_UID;
newAssignmentRow.RES_UID_OWNER = RES_UID;
newAssignmentRow.ASSN_START_DATE = DateTime.Now;
newAssignmentRow.ASSN_FINISH_DATE = DateTime.Now.AddDays(2);
readProjDs.Assignment.AddAssignmentRow(newAssignmentRow);
//check the project back in
projectClient.QueueCheckInProject(jobId, projectUids, false, sessionId, SESSION_DESCRIPTION);
tatiana