AnsweredAssumed Answered

How do you add SP.UI.ModalDialog.showWaitScreenWithNoClose after save/submit on a form (while the workflow is running).

Question asked by fpotvin on Jul 20, 2015
Latest reply on Nov 28, 2017 by markd

I have a form where I have forced the workflow to complete while the item is being created (using conditional statements on the workflow) before the form is closed. 


Sometimes, the workflow can take up to 15-20 seconds to complete.  I'd like to have a "Please wait..." display for the employee while that is happening instead of the white screen.


I tried adding NWF$(document).ready(function () {SP.UI.ModalDialog.showWaitScreenWithNoClose('Working on it', 'Action Plan is saving...');})} to the Client Click of the save button.  This worked great when the form validates but if the form doesn't validate, you can see required fields in the background but can't access them again.


Is there an easy/easier way to accomplish this?