How to redirect from record producer to child task?

Sandy29
Tera Expert

I have a record producer that creates an HR Case.  When this case is submitted, a task is created for this case.  I need a way for the user to be redirected to that task when they submit the request for the case from the portal.  How can this be accomplished?  The redirect from the record producer will only redirect to the case.  The task is not yet created on the record producer, so I cannot build a url for the redirect in the record producer script.  I need to create something that will allow the browser to wait a few seconds after submitting the request, and then get the task that was created. Any suggestions?

1 ACCEPTED SOLUTION

So what analyzes the PDF to create the task?  A business rule?  Something else?

The easiest way I see to deal with this would be to have the record producer create the case AND the task and then just do a redirect to the task.  But if that is not possible and someone just must have this because they do not want to click into the task after the case loads then you are going to have to create an SP page that has a please wait message.  That page then runs a timer and every X many seconds it looks to see if the task has showed up and when it does redirect the user.  Its going to be a lot of effort for not much return.

 

 

View solution in original post

4 REPLIES 4

DrewW
Mega Sage
Mega Sage

What is causing the task to be created?  A flow/workflow?  If so there are probably a few option but they are all bad.  Flows and Workflows don't run right away and the delay can get really bad if the instance is really busy for some reason.

 

Sandy29
Tera Expert

No, the task is created via a PDF template associated with the HR Case.

So what analyzes the PDF to create the task?  A business rule?  Something else?

The easiest way I see to deal with this would be to have the record producer create the case AND the task and then just do a redirect to the task.  But if that is not possible and someone just must have this because they do not want to click into the task after the case loads then you are going to have to create an SP page that has a please wait message.  That page then runs a timer and every X many seconds it looks to see if the task has showed up and when it does redirect the user.  Its going to be a lot of effort for not much return.

 

 

Sandy29
Tera Expert

I modified record producer redirect to call the SP page that was being called by the task. Then modified that page to allow calling from the case, and put in a recordWatch() for the new task to be created.