I'm calling listdata.svc with xmlhttprequest and POST to pass json. The new item is being created, but a new item is being created on the lookup list when I do, even though I am passing an existing lookup. Does anyone have any idea how to stop this behavior?
Here is the json:
{ "Title" : "Title", "lookup": { "__metadata":{ "uri": "/_vti_bin/listdata.svc/ListName(LookupId)", "type": "Microsoft.SharePoint.DataService.ListNameItem"} "LookupField": "lookupDisplayValue", "Id" : "LookupID"}, OtherFields...}
I've tried with one or the other of uri and type metadata. It works with either, but at least one needs to be present.