1

I am currently developing a SharePoint Add-In which has used Add-In internal Lists in which it saved its data. But I am now trying to move the lists out of the Add-In to have more possibilities in administration of these lists such as Event Listeners or Timer Jobs.

I have Custom ContentTypes on one of these Lists and I am also using List Form here to redirect a User to a specific Page within the Add-In with the ListItem-Data.

I am not sure if it is possible to fully move all of the lists out of the Add-In with the Forms and the ContentTypes. The thing is that I am currently redirecting the user to a relative Path of the Add-In if he clicks on a ListItem. But as soon as I move to outside-located Lists I cannot provide a static URL into the Add-In (Which I need for my functionality). (SharePoint always change the URL of the Add-Ins)

Is my problem clear and is here anyone who can help me?

EDIT: I only have the following link besides the "pure" app-url:
http://server:port/sites/mysite/_layouts/15/appredirect.aspx?instance_id=6691d7f1%2D466e%2D4804%2Da9f4%2Dec896a6a19cd

But with this URL I cannot provide any parameters to my sharepoint-hosted app/add-in.

2
  • What do you want ? Do you want to move app web lists to host web ? OR do you want to open lists in app web with relative url ? Commented Mar 6, 2017 at 13:15
  • i want to use Forms on Content Types which are now placed in the Web lists. But i want to redirect the user to an app-internal view when clicking on a list item via forms. Did you understand it?
    – Snickbrack
    Commented Mar 6, 2017 at 13:21

2 Answers 2

0

The thing is that I am currently redirecting the user to a relative Path of the Add-In if he clicks on a ListItem. But as soon as I move to outside-located Lists I cannot provide a static URL into the Add-In (Which I need for my functionality). (SharePoint always change the URL of the Add-Ins)

But SharePoint creates a site relative url for each SharePoint-hosted app created, that does not use the app url. For example, I have an app on one of my sites called "Tax Calendar". It's url is https://tenant-61a62e04fdcd26.sharepoint.com/teams/myteam/Tax Calendar. I can also access it by going to https://tenant.sharepoint.com/teams/myteam/Tax Calendar. You can check using REST with /_api/Web/Webs, and it will list your app as a sub site, with a site relative url.

Will this solve your issue moving your lists outside of the app?

4
  • no. this will not solve my issue cause a cannot access my app the same way as you are doing it...
    – Snickbrack
    Commented Mar 6, 2017 at 13:09
  • You don't have a site relative url that you can use to link to your app?
    – wjervis
    Commented Mar 6, 2017 at 13:42
  • I only have the link with the appredirect.aspx-Page. but with this link it is impossible to provide parameters through the url
    – Snickbrack
    Commented Mar 6, 2017 at 14:57
  • I fail to see why you can't link to it, using the site relative url I mention. The appredirect page is just how SharePoint passes the context (for provider hosted apps) and redirects to the app's default page. You can directly browse to any page in your app using the site relative url and its path.
    – wjervis
    Commented Mar 6, 2017 at 18:41
-1

Add-In Urls changes every time, Static Url is not an option for you. I think you better go for SharePoint Provider hosted app and handle events there. You can start with PnP tutorials. Going for Provider hosted app gives you better handling and it will be easier for further enhancements. Hope this helps. Thanks

10
  • hello, I am using a SharePoint-hosted app which is also called an Add-In.-
    – Snickbrack
    Commented Mar 6, 2017 at 13:03
  • I knew App name changed to Add-In. When I say SP Provider Hosted App, I mean SP Provider Hosted Add-in.
    – SPUser
    Commented Mar 6, 2017 at 13:17
  • but i meant SharePoint-hosted app in my question...
    – Snickbrack
    Commented Mar 6, 2017 at 13:19
  • With SharePoint Hosted App, you cannot utilize event receivers/timer job features Reference link
    – SPUser
    Commented Mar 6, 2017 at 13:29
  • Provider hosted apps cannot utilize timer jobs either.
    – wjervis
    Commented Mar 6, 2017 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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