Skip to content

Instantly share code, notes, and snippets.

@ryanjonhealy
Last active April 5, 2016 07:56
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 ryanjonhealy/c09a24f277c5f537b715edbb9539c749 to your computer and use it in GitHub Desktop.
Save ryanjonhealy/c09a24f277c5f537b715edbb9539c749 to your computer and use it in GitHub Desktop.
function activateFeature(rawGuid){
//get contextr of newly created site
var clientContext = new SP.ClientContext($site_url);
web = clientContext.get_web();
//Activate Features
ActivateWebFeature(web);
function ActivateWebFeature(web){
//trinedy branding feature GUID
var guid = new SP.Guid('{'+rawGuid+'}');
var featDefinition = web.get_features().add(guid, true, SP.FeatureDefinitionScope.farm);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment