New answers tagged

0

Have a look at this article. It explains both setting the correct permissions for your app for access parent web or site and also how to make the call using REST api: https://msdn.microsoft.com/en-us/library/fp179927.aspx


0

First you should serialize your Canvas to a Data Url using: canvas.toDataURL(); By doing so, you get the Image as a dataURL, which contains the base 64 Encoded Version of the File (usually in PNG Format). The Data is located after the first comma. Details here. You can then upload this file using either CSOM or REST. See this article for uploading


0

I think this occurs due to missing Type attribute in List Item entry. If you want to create list items using REST you will need to include the list item type. The list item type is a string automatically created by SharePoint when the list is first created. You can generate this value using the list name. The syntax is : SP.Data.{ListName}ListItem. So ...


1

You have used "id" variable in your code, but where did you define/assign it. url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('ChangeOfAddressList')/items(" + id + ")


1

Two things: Your metadata type is wrong. It should be SP.Data.ChangeOfAddressListListItem. The format is SP.Data.(list name)ListItem or SP.Data.(library name)Item when adding or updating an item. You are missing some headers. A POST request signals an add but you want to do an update. To tell SharePoint that you really want to do an update you need to send ...


0

Based on your comment response, you'd do it like: var itemProperties = { '__metadata': { "type": "SP.List" }, "Title": $("#FirstName").val(); };



Top 50 recent answers are included