Вопрос

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?

Это было полезно?

Решение

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>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top