Skip to content

Instantly share code, notes, and snippets.

@vman
Created June 16, 2014 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vman/adda5ed6508816369cc3 to your computer and use it in GitHub Desktop.
Save vman/adda5ed6508816369cc3 to your computer and use it in GitHub Desktop.
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
{
SPRemoteEventResult result = new SPRemoteEventResult();
using (ClientContext clientContext = TokenHelper.CreateAppEventClientContext(properties, useAppWeb: false))
{
if (clientContext != null)
{
Web hostWeb = clientContext.Web;
var props = hostWeb.AllProperties;
props["ModifiedFromAppInstalledEvent"] = "true";
hostWeb.Update();
clientContext.ExecuteQuery();
}
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment