1

SP2010

Current setup: User is redirected to page after saving newform, which then directs them to the edit form of the item just created.

Problem: there is a workflow that is started when an item is created. User gets redirected to the editform before the workflow completes, therefore an error is received when saving.

Unsure if this would be a solution, but I'm thinking if I can hold the user on the redirect page for 5 seconds or so, it would allow the workflow to complete before the user gets to the editform.

How can I set a timer on the page?

Current script on the redirect page:

<script type="text/javascript">
    document.location.href = &apos;<xsl:value-of select="$RedirectURL" />&apos; +
    &quot;?ID=&quot; + &apos;<xsl:value-of select="@ID" />&apos;;
</script>

1 Answer 1

0

I guess you can do something like the following, but this is also pretty terrible.

The solution should probably be re-engineered.

window.setTimeout(function(){
document.location.href = &apos;<xsl:value-of select="$RedirectURL" />&apos; + &quot;?ID=&quot; + &apos;<xsl:value-of select="@ID" />&apos;;
}, 5000);
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.