This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class HelloWorldApplicationCustomizer extends BaseApplicationCustomizer { | |
private _externalJsUrl: string = "https://{yourtenant}.sharepoint.com/CDN/CustomStyling.css"; | |
private _externalJsUrl2: string = "https://{yourtenant}.sharepoint.com/CDN/CustomScript.js"; | |
private _externalJsUrl3: string = "https://{yourtenant}.sharepoint.com/CDN/jquery-3.3.1.min.js"; | |
public onInit(): Promise { | |
Log.info(LOG_SOURCE, `Initialized ${strings.Title}`); | |
// Added to handle possible changes on the existence of placeholders. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var featureCollection; | |
var oneFeature; | |
var site; | |
var guid | |
function findFeatureId() { | |
var clientContext = new SP.ClientContext(); | |
site = clientContext.get_web(); | |
clientContext.load(site); | |
featureCollection = site.get_features(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$guid = "d17a4766-5115-4be4-8138-9962885912bc" | |
Get-SPLogevent -starttime (get-date).addminutes(-65) | ?{$_.Correlation -eq $guid} | select Message | Format-table -property message-autosize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$web = get-spweb http://sp2013/sites/Root #Change to your site URL | |
$template = $web.GetAvailableWebTemplates(1033) | Where-Object {$_.Title -eq “TemplateSite”} #Change to your template name | |
$SiteCollection = Get-SPSite http://sp2013/sites/Root #Change to your site URL | |
#Get the Term Store ID | |
$TaxSession = Get-SPTaxonomySession -Site $SiteCollection | |
$TermStore = $TaxSession.TermStores[“Managed Metadata Service”] #Change to your service name | |
$TermStore.Id | |
#Get the Term Set | |
$TermStoreGroup = $TermStore.Groups[“Functions”] #Change to your Terms Store group name -the main parent term | |
$TermSetList = $TermStoreGroup.TermSets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$siteColl = Get-SPSite -Identity "http://sp2013/sites/EDMS" | |
$spSite = [Microsoft.SharePoint.SPSite] ($siteColl) | |
$TaxSession = Get-SPTaxonomySession -Site $SiteCollection | |
$TermStore = $TaxSession.TermStores[“Managed Metadata Service”] #Change to your service name | |
$TermStore.Id | |
#Get the Term Set | |
$TermStoreGroup = $TermStore.Groups[“Functions”] #Change to your Terms Store group name -the main parent term | |
$TermSetList = $TermStoreGroup.TermSets | |
#create an array | |
$myArray = $TermSetList.Terms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CustomExecuteFunction() { | |
var self = this; | |
self.context = new SP.ClientContext.get_current(); | |
self.web = context.get_web(); | |
self.currentUser = web.get_currentUser(); | |
context.load(self.currentUser); | |
self.asyncSuccess = function(sender, args) { | |
var user = this.currentUser; | |
console.log('asyncSuccess', user); |