We open different forms basend on button links in SPO list views (generated by SPO colum formatting in modern list view). But for going back, we need the sourceUrl of the formerly list-view to show the same list-view after editing some list item.
document.referrer or instead js objects doesn't show the formerly url.
You have two options to set the Source URL.
Specify the Source URL in the button link in the list view.
So the link to the item will be:
fd.source = '<List view URL>';
I like the look of your column formatting in modern sharepoint lists. Would you mind sharing the JSON for each of the formatted columns shown in your screencapture?
Hi @mnikitina, that doesn't solve my use case. I want get back to the original url which has the form loaded (like document.referrer / window.history.go(-1)), but I doesnt have a chance to get this value in the form to redierct back after save. Beacuse the form always go back to the standard view on the list.
There is no chance to retrieve the referrer url in Plumsail forms?
Hi @stormanh. Here are the files which we use for formatting the list:
DueDate.json (309 Bytes)
DMAIC.json (663 Bytes)
OnTrade.json (453 Bytes)
Button2.json (887 Bytes)
Button.json (581 Bytes)
Please use the below code to be redirected o the previous page.
fd.source = window.history.back();