locked
Is it possible to edit a SharePoint 2013 list item, just by visiting a URL/link, e.g. by passing new value in Get URL, without actually having to click on Edit button? RRS feed

  • Question

  • Hi there

    Is it possible to edit a SharePoint 2013 list item, just by visiting a URL/link, e.g. by passing new value in Get URL, without actually having to click on Edit button? 

    Thanks so much.


    • Edited by ran009 Friday, October 27, 2017 6:57 PM
    Friday, October 27, 2017 5:42 PM

Answers

  • Hi,

    To edit a list item only by a URL, We can create a ASP.Net Web API project so we can use CSOM to achieve it.

    http://sharepointpals.com/post/Create-a-WebAPI-to-AddEditDelete-the-data-from-a-SharePoint-List

    However, it doesn’t recommend to edit data only by GET URL because GET method is designed to retrieve data instead of editing.

    We'd better use REST API to modify data by POST method.

    Here is the sample code

    url: http://site url/_api/web/lists/GetByTitle('Test')/items(item id)
        method: POST
        body: { '__metadata': { 'type': 'SP.Data.TestListItem' }, 'Title': 'TestUpdated'}
        headers:
        Authorization: "Bearer " + accessToken
        X-RequestDigest: form digest value
        "IF-MATCH": etag or "*"
        "X-HTTP-Method":"MERGE",
        accept: "application/json;odata=verbose"
        content-type: "application/json;odata=verbose"
      content-length:length of post body

    More information for your reference:

    https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest

    Best regards,

    Lee Liu


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    • Edited by Lee Liu Tuesday, October 31, 2017 1:22 AM
    • Proposed as answer by Dennis Guo Thursday, November 2, 2017 9:53 AM
    • Marked as answer by ran009 Thursday, November 2, 2017 8:59 PM
    Monday, October 30, 2017 10:28 AM

All replies

  • Her eyou go

    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/d133ecc6-64de-43bc-8e61-48570ac85064/change-new-item-edit-item-url?forum=sharepointcustomizationlegacy

    https://social.technet.microsoft.com/Forums/office/en-US/2d9cb470-89b7-4a4c-a952-412d4e622cd1/change-url-for-link-to-edit-item?forum=sharepointgeneralprevious


    Please remember to click Mark as Answer on the answer if it helps you

    Friday, October 27, 2017 7:21 PM
  • Hi,

    To edit a list item only by a URL, We can create a ASP.Net Web API project so we can use CSOM to achieve it.

    http://sharepointpals.com/post/Create-a-WebAPI-to-AddEditDelete-the-data-from-a-SharePoint-List

    However, it doesn’t recommend to edit data only by GET URL because GET method is designed to retrieve data instead of editing.

    We'd better use REST API to modify data by POST method.

    Here is the sample code

    url: http://site url/_api/web/lists/GetByTitle('Test')/items(item id)
        method: POST
        body: { '__metadata': { 'type': 'SP.Data.TestListItem' }, 'Title': 'TestUpdated'}
        headers:
        Authorization: "Bearer " + accessToken
        X-RequestDigest: form digest value
        "IF-MATCH": etag or "*"
        "X-HTTP-Method":"MERGE",
        accept: "application/json;odata=verbose"
        content-type: "application/json;odata=verbose"
      content-length:length of post body

    More information for your reference:

    https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest

    Best regards,

    Lee Liu


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    • Edited by Lee Liu Tuesday, October 31, 2017 1:22 AM
    • Proposed as answer by Dennis Guo Thursday, November 2, 2017 9:53 AM
    • Marked as answer by ran009 Thursday, November 2, 2017 8:59 PM
    Monday, October 30, 2017 10:28 AM