Skip to main content

The redirect URL in the form can redirect the user to the required page but before assigning an ID to the created item, so the ItemURL has the ID = 0, is there a way to get the ID and redirect to the Display or the Edit page after creating the new item?

Inside your form you could query the last ID used on the list, and then assume that your new item will be the read one + 1.


Thank you Fernando Hunth​ for your reply, but this way you are assuming that it is a single user solution.

There is another way, which is creating another middle page and query for the last ID by Created By current user, but I want to see if there is a better way.


What if the previous item was deleted Fernando Hunth​? It will show error.

Some one had asked a similar question earlier and encountered the same issue.

I dont know if this would work but you could submit the form using Javascript on the button and within this script, read the last ID created (max ID), and redirect the user (not sure how). happy.png


Kapil Joshi​, how to submit the form using JavaScript? Do you men read the form values and create the item via SP.js?


Correct.

See the reference below:

Jquery / Javascript Submit 2010 Nintex form

Nintex forms custom button submit AND redirect


Thank you Kapil Joshi​, but these samples are just simulating the click button event but none is returning the new item ID.


Osama Mourad

Following up on this old issue. Let us know your solution and mark it as correct to help others on the community.


Unfortunately the middle page is the best solution for this case.

And to solve the multiple users issue, I am checking the created by current user in the query.

So the full solution as a workaround is:

1. Set the form Redirect URL to a page with JS Webpart

2. The JS Webpart is querying the list every second with a please wait message waiting for an item created within seconds and created by current user.

3. Once the item retrieved it redirect the user to the form using the retuned item ID.


Reply