1

How can I save document library lookup field using REST API Post in a SharePoint list? I tried like

'docItem':'1;#test'

But, it is throwing an error :

{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"A 'PrimitiveValue' node with non-null value was found when trying to read the value of a navigation property; however, a 'StartArray' node, a 'StartObject' node, or a 'PrimitiveValue' node with null value was expected."}}} Bad Request

1

'docItem':'1', simple this should work.. Or you can try 'docItem':1

1

In REST, adding 'Id' to the column works as long as your specifying the Id.

LookupColumn: "docItem"

"docItemId" : 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.