none
Error : when I am trying set ProjectDataSet.TaskCustomFieldsRow in Field "Finish10" from PSI RRS feed

  • Question

  • I'am from Russia. Sorry if I'am wrong to say

    I have trying set to field "Finish10" to Task from PSI.

    This is code

     

    public bool ibrProjectSetTaskCustomFieldValue(backendProject.ProjectDataSet readproject, Guid pTaskUID, Guid MD_PROP_UID, object pCFValue,int aMD_PROP_ID, eCustomFieldType pCFType,byte  aFIELD_TYPE_ENUM) bool Result = false ;

    if (readproject.TaskCustomFields.Count > 0)

    {

     TaskCFRow.PROJ_UID = readproject.Project[0].PROJ_UID;

    TaskCFRow.TASK_UID = pTaskUID;TaskCFRow.CUSTOM_FIELD_UID =Guid.NewGuid();

    TaskCFRow.MD_PROP_ID = aMD_PROP_ID;

    TaskCFRow.FIELD_TYPE_ENUM = aFIELD_TYPE_ENUM;TaskCFRow.MD_PROP_UID = MD_PROP_UID; //Guid Fields

     TaskCFRowDATE_VALUE = (DateTime)pCFValue;  readproject.TaskCustomFields.AddTaskCustomFieldsRow(TaskCFRow);

     }

     return

    Result;

    }

    and then published

    psi.AddToProject(sessionUID, updateProjectDataSet);

     

     

    psi.CheckInProject(ProjUID, sessionUID,);

     psi.ProjectPublish(ProjUID);

    Wednesday, April 20, 2011 12:35 PM

Answers

  • "Finish10" is a local custom field, which is undefined until you initialize it in Project Professional. The PSI can create only enterprise custom fields. In the SDK, What the PSI Does Not Do states that the PSI cannot create local custom fields, "However, the PSI does support editing local custom field values on tasks, resources, and assignments."

    To create local custom fields, you can use Project Professional manually, or with a VBA macro or a VSTO add-in.

    --Jim


    Jim Corbin [MSFT]
    Tuesday, April 26, 2011 3:38 PM

All replies