As Nintex forms on o365 does not have the option to set the URL to the page you want to go to after saving your item, there is a work around for that, in the below code I am changing the source parameter in the url to the new page which is the edit form in my case.
var newSrc = hostWebUrl + '/Lists/MyList/DispForm.aspx?ID=' + listItemId;
var newUrl = document.URL.replace(/(source=).*?(&)/gi,'$1' + newSrc + '$2');
window.history.pushState({path:newUrl},'',newUrl);
var newSrc = hostWebUrl + '/Lists/MyList/DispForm.aspx?ID=' + listItemId;
var newUrl = document.URL.replace(/(source=).*?(&)/gi,'$1' + newSrc + '$2');
window.history.pushState({path:newUrl},'',newUrl);
I hope it help somebody.
No comments:
Post a Comment