Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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";
</script>

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,

Spre3

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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? –  Spre3 Jan 25 '12 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. –  David Lozzi Jan 25 '12 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? –  Spre3 Jan 25 '12 at 13:55
    
Yes, you can customize the task form using SharePoint Designer/InfoPath and make it do what you need. –  David Lozzi Jan 26 '12 at 0:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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