Hot answers tagged

3

If your column's internal name is PostCategory and list's internal name is Posts then try using below code as your data in POST call: data: JSON.stringify({ "__metadata": { type: "SP.Data.PostsListItem" }, "PostCategoryId": 2 }) Is multiple selection allowed on PostCategory? Update: For multiple selection ...


1

It seems you are running your code from different site page and trying to add item to list which is in diffrent site...I assumed this because you are building your target url with absolute url.. if that is case, it won't work. 403 forbidden means you are not allowed to access that resource. You are getting this error because RequestDigest token which you ...


1

I want to piggy-back on Mark's answer and make it work for the blog Open http://YOUR_SITE/YOUR_BLOG/Lists/Posts/NewPost.aspx URL. Cog wheel > Edit page > add a Web Part > Content Editor Web Part Inject the following in the body of the CEWP: Code to inject to CEWP: <script> $("[id^='Body_'] p").innerHTML = "<h1>Standard text in the body of ...


1

Are you using discussion board app? You can add default value to your body textarea on the default new form. Open your list, click "List" tab at the top ribbon banner, select Form Web Parts -> Default New Form: In the default new form edit mode view, add a content editor webpart. Click on the webpart area, click edit source at ribbon bar. Then insert below ...


1

You need to set the value of the X-Request-Digest header with the X-Request-Digest value you get from the contextinfo endpoint to make POST requests using the REST api. See this thread: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/40833576-5853-4ca4-95cf-b5b1d69f465f/sharepoint-rest-and-c-sample-to-update-list-item?forum=sharepointdevelopment ...


Only top voted, non community-wiki answers of a minimum length are eligible