我需要更新引用查找的Custom字段,并允许在sharepoint中选择多个值。我使用下面的代码更新自定义字段,但允许单行文本:
ProjCFRow.CODE_VALUE = new Guid(rowLTT["LT_STRUCT_UID"].ToString());
或将其添加到项目中,如:
rowProjCF = projectDs.ProjectCustomFields.NewProjectCustomFieldsRow();
rowProjCF.PROJ_UID = projectId;
rowProjCF.CUSTOM_FIELD_UID = Guid.NewGuid();
rowProjCF.FIELD_TYPE_ENUM = (byte)PSLibrary.CustomField.Type.TEXT;
rowProjCF.CODE_VALUE = new Guid(rowLTT["LT_STRUCT_UID"].ToString());
rowProjCF.MD_PROP_UID = x.Key;
rowProjCF.MD_PROP_ID = cfRow.MD_PROP_ID;
dtProjCustomFiled.AddProjectCustomFieldsRow(rowProjCF);
我该怎么做?
if (SingleprojectDS.ProjectCustomFields.Select("MD_PROP_UID = '" + CFGuid + "'").Length == 0)
{
ProjectDataSet.ProjectCustomFieldsRow FunctionCFRow = ProjDS.ProjectCustomFields.NewProjectCustomFieldsRow();
FunctionCFRow.PROJ_UID = ProjectGuid;
FunctionCFRow.MD_PROP_UID = CFGuid;
FunctionCFRow.CUSTOM_FIELD_UID = Guid.NewGuid();
FunctionCFRow.TEXT_VALUE = Value;
ProjDS.ProjectCustomFields.AddProjectCustomFieldsRow(FunctionCFRow);
}
对于完整的帖子http://projectservercode.com/update-custom-field-using-psi/