none
Can we redirect user to "DispForm.aspx" after user adds an item to a List through "NewForm.aspx" ? RRS feed

  • Question

  • Requirement :

    User is having full permission to site and he is adding one item to a list through OOTB "NewForm.aspx" page. After adding he is getting redirected to "AllItems.aspx" page.

    But I want the user should get redirected to "DispForm.aspx" with List item's ID in the query string  to see the submitted details of the newly added item.

    I can achieve it through CSOM : By replacing the OOTB submit button in the "NewForm.aspx" with my custom submit button. I shall call my CSOM code on button click.

    Is there in other way to achieve the same without going for CSOM?


    Rakesh

    Wednesday, March 8, 2017 8:55 AM

Answers

  • Hi, 

    I do not think there is any ootb way to achieve the same. The problem you are going to encounter is that you need the ID for the item you just created in order to redirect the user to the DispForm displaying the correct item. You can use your logic to overwrite the save button with your own method using CSOM or REST. 

    Thanks.

    • Marked as answer by Rakesh_Nayak Monday, March 13, 2017 10:14 AM
    Wednesday, March 8, 2017 11:14 AM