SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
var waitingDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Your action is in progress...', "Please wait while we generate the tasks for you.");

error

Unable to get property showWaitScreenWithNoClose of undefined or null reference

I keep getting this error message, how do I fix this?

share|improve this question
up vote 12 down vote accepted

It seems you are missing SP.SOD.executeFunc. Try following.

SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function() {
    var waitingDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Your action is in progress...', "Please wait while we generate the tasks for you.");
});

I have tried it and output is following

enter image description here

Reason

SP.UI.ModalDialog execution must be delayed until sp.js and SP.ClientContext are loaded.

share|improve this answer
    
thanks! it works now – Khalifa Sabt Jan 4 at 7:29

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.