Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Getting metadata from a document library containg folders

$
0
0

Hello,

I am creating folders and updating a column called 'IsActive' via code and this is working.  What I am trying to do now is retrieve that information, I can get the folder, but I do not know how to include the column 'IsActive'.  The code for retrieving the folder is:

            if (string.IsNullOrEmpty(fullFolderUrl))
                throw new ArgumentNullException("fullFolderUrl");
            try
            {
                ClientContext context = new ClientContext(siteURL);
                Web web = context.Web;

                if (!web.IsPropertyAvailable("ServerRelativeUrl"))
                {
                    web.Context.Load(web, w => w.ServerRelativeUrl);
                    web.Context.ExecuteQuery();
                }
                var folder = web.GetFolderByServerRelativeUrl(web.ServerRelativeUrl + fullFolderUrl);
                web.Context.Load(folder);
                web.Context.ExecuteQuery();
                return true;
            }
            catch(System.IO.FileNotFoundException)
            {
                return false;
            }

How would i add the code to bring back the IsActive column (this is a Yes / No field).

Thanks in advance

Duane


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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