2

I am creating an App via the javascript + CSOM...

After I have finished processing I need the app to send the user back to the original page he was on. How do you retrieve the page from sharepoint to forward them on?

I am using sharepoint 2013 online

2

In the Url for your app include SomeThing={Source} in addition to {StandardTokens} that'll then pass you the Url to return to

For more tokens see URL strings and tokens in apps for SharePoint

  • I cant use {Source} as its a immersive experience and {Source} doesn't work on the start page :( – Michael Mar 17 '14 at 22:06
2

If your app provides the immersive experience, then you already provide link to the Host Web via the Chrome control.

If your app provides the AppPart experience, then the "original page" has no meaning.

If your app provides the Custom Action experience (on the ribbon or ECB), then I would suggest showing your app experience inside a dialog, then close the dialog when "finished processing."

  • thanks. I will have to look more into the chrome control. – Michael Mar 16 '14 at 11:16
  • I am making an app that provides the immsersive experience. but I cant see how the chrome control helps. I can get the Host Web page, but not the exact webpage that The user was on before clicking the link to my app... – Michael Mar 17 '14 at 21:56
  • The user was on the Site Contents page when they launched your app. Returning to Site Contents is quite simple -- start with the HostWebUrl and append "/_layouts/15/viewlsts.aspx". If you've provided a link to your app from somewhere else, then obviously you can include any querystring params that would help. – Paul Schaeflein Mar 18 '14 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.