'Waiting to Complete' animation for Remote Event Receiver - SharePoint 2013 App

I have a ProcessEvent method which has a RemoteEventType - HandleItemAdded. Since I have some custom functionality in HandleItemAdded function, it takes some time for the associated List item to get submitted.

Is it possible to have a "waiting to complete" dialog appear during this activity? The code is written in Provider Hosted App's App Installed Event done in CSOM.



Sample code below: public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)

{ SPRemoteEventResult result = new SPRemoteEventResult(); switch (properties.EventType) { case SPRemoteEventType.AppInstalled: HandleAppInstalled(properties); break; case SPRemoteEventType.AppUninstalling: HandleAppUninstalling(properties); break; case SPRemoteEventType.ItemAdded: HandleItemAdded(properties); break; } return result; }



January 22nd, 2015 6:31am

Hi,

you can use show wait screen

function RequestEnded(sender, args) {
  try {
    waitDialog.close();
    waitDialog = null;
  } catch (ex) { }
};

function RequestStarted(sender, args) {
   ExecuteOrDelayUntilScriptLoaded(ShowWaitDialog, "sp.js");
};

function ShowWaitDialog() {
   try {
      if (waitDialog == null) {
         waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Processing...', 'Please wait while request is in progress...', 76, 330);
      }
   } catch (ex) { }
};

http://sharepoint.stackexchange.com/questions/88905/javascript-how-to-reuse-the-working-on-it-pop-in

http://blog.eastridge.net/how-to-display-the-sharepoint-working-on-it-page

Free Windows Admin Tool Kit Click here and download it now
January 22nd, 2015 11:53am

Hi,

Actually I am doing this in SharePoint 2013 provider hosted app. So I need something in CSOM(C#). And SPLongOperation is not available in CSOM

Please advise.

March 10th, 2015 1:25am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics