I am trying to build a sequential workflow on VS2010 that at some point gets the necessary javascript code to render a page. Let's assume the javascript is :

<script type="text/javascript">
    var link = document.createElement('div');
    link.innerHTML= "Hello";

So how would I be able to implement this so that when the workflow is finished, it takes me to a page where I can run that javascript? Any tutorials, or sample code would be much appreciated.

Thanks in advance,


1 Answer 1


You won't be able to. Workflows run on the timer service, independent of the current user, or httpcontext. Some workarounds are to 1) assign a task to the user at completion 2) send email to user from workflow at completion 3) create a view of completed workflows. Any of these will allow the user to access said page after the workflow is complete, but it'll be a manual process.

  • In that case would you say using a custom sequential workflow is the best way to do it? How would I be able to access the javascript code retrieved by the workflow once it is completed?
    – Perbert
    Jan 25, 2012 at 9:09
  • What I would do is assign a task to the user, include in the task a link to a custom page which would then have your javascript and anything else. Jan 25, 2012 at 12:48
  • I am not sure that is what I am looking for. This javascript generates a page with an interview and I would like that interview to be part of the workflow. Could I create a task that consisted of completing that interview? Maybe have some sort of task form to display the interview or something?
    – Perbert
    Jan 25, 2012 at 13:55
  • Yes, you can customize the task form using SharePoint Designer/InfoPath and make it do what you need. Jan 26, 2012 at 0:00

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.