![](/img/trans.png)
[英]Unable to update CustomField on a Task or Project with Lookup table GUID using csom
[英]Get Guid lookup table from custome Field in Microsoft Project Online
在這種情況下,我有一個custome字段,即“ Project Phase”,然后根據查閱表提供值。
我如何基於上圖中顯示的延遲值獲取GUID或內部名稱,例如“ Entry_d4399450ea69e61180cb00155d18530e ”。 我將使用此內部名稱使用C#控制台更新數據。
這是我的簡單代碼,但無效:
var PrjList = projContext.LoadQuery(projContext.CustomFields.Where(proj => proj.Name == cFieldName));
projContext.ExecuteQuery();
Guid pGuid = PrjList.First().Id;
Console.WriteLine(pGuid);
我終於在ms項目中得到了簡單的linq查詢,以基於custome字段獲取內部查詢名稱。 這是我的代碼,它起作用了:
var InternalNameLookup = pubProj.CustomFields.LookupEntries.Where(x => x.FullValue == "Delay").First().InternalName;
此代碼將顯示內部名稱“ Entry_d4399450ea69e61180cb00155d18530e ”。 這是我需要基於查找字段更新我的custome字段。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.