Delay redirect to wait for workflow

rss

Posted by Stu - Jun 23 ’16 at 05:59

Hi Guys

I have a case where I create an Item I need to generate a "Number" for the form. I get this number by a workflow when the new form is saved. It initiates the workflow to add the number. I redirect to the edit form and display the number the workflow added. It works 80% of the time.

The other 20% the Edit item from loads before the workflow has assigned the number.

Can I make the redirect delay a few second until the workflow has finished?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 21 days
    #1 by Dmitry Kozlov Jun 24 ’16 at 04:08

    Hi Stu,

    I recommend you to populate the Number via JavaScript directly in the New form.

  • Stu
    Member
    Member for: 3 years 7 months 2 days
    #2 by Stu Jun 24 ’16 at 05:24

    Hi Dmitry

    I have considered that but unfortunately I can only get the number after the form has been saved else I will be losing numbers to unsaved forms and the number needs to be incremented each time I take one.

    Is there a method to delay the redirect?

    In this case I have removed the redirect and force the users to reopen the edit form. But it would be useful to be able to delay the redirect to allow processing to complete.

    thanks

    Stu

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 21 days
    #3 by Dmitry Kozlov Jun 27 ’16 at 05:02

    [#2]: No, you cannot delay the redirection, but you can, say, calculate the Number via JavaScript in the Edit form and display it before populating the field via the workflow.

Displaying 1 to 3 of 3 messages