Question

I am trying to figure out how to redirect from DispForm to EditForm. I want to be able to click on a task and enter directly in Edit Mode.

I have this snippet and it should work but it doesn't:

<script type="text/javascript">

var ActualURL = window.location.href;
var SecondURL = ActualURL.replace(“DispForm.aspx”, “EditForm.aspx”);
window.location.replace(SecondURL);

</script>

What am I doing wrong?

Était-ce utile?

La solution

It's work fine just replace “ & ” with " and It's work fine. Please make sure you put this code on display form.

<script type="text/javascript">
var ActualURL = window.location.href;
var SecondURL = ActualURL.replace("DispForm.aspx", "EditForm.aspx");
window.location.replace(SecondURL);
</script>
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top