Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

CSOM - Read Project Custom Field (Lookup) Value

$
0
0

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



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>