I have a Sharepoint 2013 O365 App that is Autohosted. It is doing a simple list item creation on a remote sharepoint list in the site that owns the app. I have added app permissions of all kinds to test this but currently its set for Site Collection Write, Web Write, and List Write. What happens is an item gets created but has nothing in it. No title, no other meta data. It does get set on the CSOM object, but when it comes back from the server the fields are null again. When I look at the list, it shows the same... empty list items. So they get created... but with no data.
using (var clientContext = TokenHelper.GetClientContextWithContextToken(SPHostUrl, contextToken, Request.Url.Authority))
{
var web = clientContext.Web;
var reports = web.Lists.GetByTitle("SomeList");
clientContext.Load(reports);
clientContext.ExecuteQuery();
Response.Write("Total Something: " + reports.ItemCount.ToString());
clientContext.Load(reports);
clientContext.ExecuteQuery();
ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
var newReport = reports.AddItem(itemCreateInfo);
newReport.Update();
clientContext.Load(newReport);
clientContext.ExecuteQuery();
newReport.FieldValues["Title"] = "aaaaa";
newReport.FieldValues["SomeOtherTitle"] = "aaaaaaa";
newReport.FieldValues["Location"] = "NO LOC";
newReport.FieldValues["SomeType"] = "bbbbb";
newReport.Update();
clientContext.ExecuteQuery();
}