Forum Discussion

Awake Kapoor's avatar
Awake Kapoor
Copper Contributor
Nov 26, 2016

How to create a list in site not in app using SP hosted app

Hi All,

 

I just  want to know can we create a list using visual studio while creating SP hosted app in SP online, but the list resides in site on which i am hosting that app not on that particular app. kindly let me know if there is any solution for this

4 Replies

  • Yes, it is possible if the list is created after your Add-in is provisioned...if you are thinking on creating the list while the Add-in (SharePoint-Hosted) is provisioned, is not going to be possible. The only way to create the list from your SharePoint-Hosted Add-in is from an action you define there so you can use that action (a button for instance) to create the list in the host site
    • Awake Kapoor's avatar
      Awake Kapoor
      Copper Contributor
      Hey Juan thanks for your reply, if i am not wrong you are saying me to create a button and write some REST API code to create list in my host site and call this code on clicking of that button ?