Posts

Showing posts from September, 2015

SharePoint 2013 App Development Catches

Error occurred in deployment step 'Uninstall app for SharePoint': Cannot connect to the SharePoint site Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project Development Catches Can’t deploy app from VS 2012 using system account Need to give the new account DBO in the following SharePoint database Config Content DB for the Developer site collection App management service application DB So, my problem was that the account I used doesn't have DBO access to the content DB.  I used the following script on the SharePoint server and everything works fine ... Get-SPDatabase Add-SPShellAdmin -database {id} -username 

SharePoint 2013 - Display Notification on Parent Page after App Part completes its task

For a typical web part operation, you usually display some kind of message/notification when you completed a task.  So that user know the status.  The problem with the App part is that it's within an iFrame on the page.  You can't just call SP.UI.Notify.addNotification(""). The OOTB App Part support resizing of iFrame with postMessage technique only.  So, what to do ... Below is a technique that allows you to display the SharePoint popup notification on the top right corner of the parent page.  The code below is tested using JavaScript and C# in a provider-hosted app.  The basic components are as follow You have to register a custom event listener for the message event on the SharePoint page.  You can register this event on the master page so that all your App Parts can utilize the event handler You have JavaScript function that post message back to the parent On your App part post back event, you call the JavaScript to post the message back to the parent.