Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

SPFieldLookupValue does not update my list

$
0
0

Hi guys,

I'm trying to update my list programmaticaly with client object model.

this list contains a lookupfield, I'm using this code,

ListItem my = list.AddItem(new ListItemCreationInformation());

                my["Title"] = "Test";
                my["NAME"] = "Name";
                SPFieldLookupValue spv;
                spv = new SPFieldLookupValue(3,"Type");
                my["TYPE"] = spv;

                my.Update();
                ctx.Load(my);
                ctx.ExecuteQuery();

I have no error but when I refresh my list I have a new line with my new value, but the TYPE field is always empty....

any ideas?

thanks!


Viewing all articles
Browse latest Browse all 17574

Trending Articles



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