Quantcast
Viewing all articles
Browse latest Browse all 5347

CSOM - Read Project Custom Field (Lookup) Value

Dear All,

How do I read the project custom field (lookup) values using CSOM. My code as follows:

projContext.Load(projContext.Projects);
projectContext.ExecuteQuery();
foreach(PublishedProjectpubProjinprojContext.Projects)
{
    projContext.Load(pubProj.CustomFields);
    projContext.ExecuteQuery();
    foreach (CustomFieldcfinpubProj.CustomFields)
    {
        string intname = cf.InterName.ToString();
        string cf_value = pubProj[intname].ToString();  // threw an exception here
....

My guess is I am missing some steps in order to obtain the lookup value information.

Thanks,
Woon Woon, Gan





Viewing all articles
Browse latest Browse all 5347

Trending Articles