简体   繁体   English

从Microsoft Project Online中的custome字段获取Guid查找表

[英]Get Guid lookup table from custome Field in Microsoft Project Online

in this case i have custome field namely "Project Phase" then in value based on Lookup Table. 在这种情况下,我有一个custome字段,即“ Project Phase”,然后根据查阅表提供值。 在此处输入图片说明

how can i get guid or internal name like ' Entry_d4399450ea69e61180cb00155d18530e ' based on Delay value that appear in above image. 我如何基于上图中显示的延迟值获取GUID或内部名称,例如“ Entry_d4399450ea69e61180cb00155d18530e ”。 this internal name i will use for updating data using C# Console. 我将使用此内部名称使用C#控制台更新数据。

here my simple code, but it doesn't VALID: 这是我的简单代码,但无效:

var PrjList = projContext.LoadQuery(projContext.CustomFields.Where(proj => proj.Name == cFieldName));
projContext.ExecuteQuery();
Guid pGuid = PrjList.First().Id;

Console.WriteLine(pGuid);

i finally i got simple linq query in ms project to get internal name of lookup based on custome field. 我终于在ms项目中得到了简单的linq查询,以基于custome字段获取内部查询名称。 here is my codeand it worked: 这是我的代码,它起作用了:

var InternalNameLookup = pubProj.CustomFields.LookupEntries.Where(x => x.FullValue == "Delay").First().InternalName;

this code will display internal name " Entry_d4399450ea69e61180cb00155d18530e ". 此代码将显示内部名称“ Entry_d4399450ea69e61180cb00155d18530e ”。 this is that i need to update my custome field based on lookup field. 这是我需要基于查找字段更新我的custome字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM