Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

the given key was not present in the dictionary

$
0
0

Hi,

This is a SharePoint Hosted App and reads and updates list items on the host web. I am able to read list items using REST and when I try and update a item using REST I get the following error "the given key was not present in the dictionary"

This is what I have in the code

method: "POST",
                url: empMstDetails[0].__metadata.uri, // getSiteUrl + "/_api/web/lists/GetByTitle(‘Employee Master')/items(" + empMstDetails[0].Employee_x0020_ID +")",
                body: { '__metadata': { 'type': 'SP.Data.Employee_x0020_MasterListItem' }, 'Title': 'TestUpdated'},
                headers: {
                    "Accept": "application/json;odata=verbose",
                    "IF-MATCH": "*",
                    "X-HTTP-Method":"MERGE",
                    "content-type": "application/json;odata=verbose",
                    "X-RequestDigest": $("#__REQUESTDIGEST").val(),

                    "content-length":1029


Philip


Viewing all articles
Browse latest Browse all 8089

Trending Articles



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