List value is not updating in sharepoint 2013 online
Hi,

I am using client object model to manipulate list items on sharepoint 2013. My code is executing ok and update list value sucessfully. But it is not displaying on List on sharepoint.

here is code

 var clientContext = new ClientContext(sharepointSiteName);

                        List AnnouncementList = clientContext.Web.Lists.GetByTitle(Constants.EmployeeListName);
                        ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
                        ListItem item = AnnouncementList.AddItem(itemCreateInfo);
                        item.FieldValues["CompanyName"] = "New";                      
                         item.Update();
                        clientContext.ExecuteQuery();

Thanks
October 25th, 2013 4:57am

If new Item not appear on list check view Criteria, do you have any filtration.

You can check item from content and site structure

Free Windows Admin Tool Kit Click here and download it now
October 25th, 2013 5:15am

Hi Tarek,

It is not solving issue. My problem is above code add one new row in list, but that new row does not have values that i have enter. Also i am using o365.

October 25th, 2013 5:39am

try this ,

http://msdn.microsoft.com/en-us/library/gg277498%28v=office.14%29.aspx

Also, check whether the updating field names are valid or not.

Free Windows Admin Tool Kit Click here and download it now
October 25th, 2013 6:00am

Change your code snippet to below.

 var clientContext = new ClientContext(sharepointSiteName);

                        List AnnouncementList = clientContext.Web.Lists.GetByTitle(Constants.EmployeeListName);
                        ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
                        ListItem item = AnnouncementList.AddItem(itemCreateInfo);
                        item["CompanyName"] = "New";                      
                         item.Update();
                        clientContext.ExecuteQuery();
October 25th, 2013 6:08am

Hi Bala,

Still it is not solving my problem, result is same.

Free Windows Admin Tool Kit Click here and download it now
October 25th, 2013 7:07am

Hi Dinesh,

It is not solving my problem, result is same.

October 25th, 2013 7:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics