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

Cannot find the new columns I added to a list a week ago

$
0
0

Hi, I'm using VS2012.

I added a couple of new columns to an existing list over a week ago.  Using C# code, I was able to connect to the site and got the list.  Able to update the columns until I got to the new column4,  and then I got exception error.  How to fix this?  Thank you.

exp = {"Column 'new-column4' does not exist. It may have been deleted by another user.  /Lists/MyList"}

           ClientContext context = new ClientContext("https://xxx.yyy.zzz");
            List MyList = context.Web.Lists.GetByTitle("MyList");

            ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
            ListItem newItem = MyList.AddItem(itemCreateInfo);
            newItem["column1"] = column1Value;
            newItem["column2"] = column2Value;
            newItem["column3"] = column3Value;
            newItem["new-column4"] = column4Value;
            newItem["new-column5"] = column5Value;
            newItem["column6"] = column6Value;


Thank you


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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