I faced this problem in one of the sharepoint apps I was working on, a quick search on google returned few pages which suggest a solution:
Add a dummy list to the app: This solution works since sharepoint automatically creates app web for the app if there is some content to be deployed to the web.
More references:
https://stackoverflow.com/questions/18334525/cant-get-spappweburl-sharepoint-2013
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/url-strings-and-tokens-in-sharepoint-add-ins?redirectedfrom=MSDN#Anchor_0
https://social.msdn.microsoft.com/Forums/en-US/7c417bb9-4456-4f67-a71b-97928369e040/how-to-add-standardtokens-to-aspx-page?forum=appsforsharepoint
https://sharepoint.stackexchange.com/questions/104063/sharepoint-app-spappweburl-query-string-is-missing-after-using-sharepointcont
Add a dummy list to the app: This solution works since sharepoint automatically creates app web for the app if there is some content to be deployed to the web.
More references:
https://stackoverflow.com/questions/18334525/cant-get-spappweburl-sharepoint-2013
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/url-strings-and-tokens-in-sharepoint-add-ins?redirectedfrom=MSDN#Anchor_0
https://social.msdn.microsoft.com/Forums/en-US/7c417bb9-4456-4f67-a71b-97928369e040/how-to-add-standardtokens-to-aspx-page?forum=appsforsharepoint
https://sharepoint.stackexchange.com/questions/104063/sharepoint-app-spappweburl-query-string-is-missing-after-using-sharepointcont
No comments:
Post a Comment