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
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.1.js"></script> | |
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/knockout/knockout-3.1.0.js"></script> | |
<script type="text/javascript" src="../Scripts/MyInterestingDocuments.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.3/moment.min.js"></script> | |
<script type="text/javascript"> | |
Type.registerNamespace('Wictor.OfficeGraph.JS') | |
Wictor.OfficeGraph.Document = function (id, title) { | |
var self = this |
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
$.getScript(_spPageContextInfo.webServerRelativeUrl + "/_layouts/15/" + "SP.Taxonomy.js", function () { | |
var context = SP.ClientContext.get_current() | |
var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context); | |
var term = session.getTerm('beeda2c0-d3d1-4ceb-90f8-99c74ad86659'); | |
context.load(session); | |
context.load(term); | |
context.executeQueryAsync( | |
function () { | |
var t = "Name: " + term.get_name() + "\n" |
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 context = SP.ClientContext.get_current() | |
var web = context.get_web() | |
var props = web.get_allProperties() | |
context.load(web) | |
context.load(props) | |
context.executeQueryAsync( | |
function () { | |
var t = "Properties\n" | |
for (var z in props.get_fieldValues()) { |
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
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext(SITE) | |
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username,$password ) | |
$web = $ctx.Web | |
$ctx.Load($web) | |
$list = $web.GetList(LISTURL) | |
$ctx.Load($list) | |
$ctx.ExecuteQuery() | |
# Fiddle a bit with $batch and $c (could be done better, but it worked for my needs right now) |
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
net use z: \\<account name>.file.core.windows.net\<share name> /u:<account name> <account key> |
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 context = SP.ClientContext.get_current() | |
var web = context.get_web() | |
var rs = web.get_regionalSettings() | |
var tz = web.get_regionalSettings().get_timeZone() | |
var tzs = web.get_regionalSettings().get_timeZones() | |
context.load(web) | |
context.load(rs) | |
context.load(tz) | |
context.load(tzs) | |
context.executeQueryAsync( |
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 context = SP.ClientContext.get_current() | |
var web = context.get_web() | |
var actions = web.get_userCustomActions(); | |
context.load(actions) | |
context.executeQueryAsync( | |
function () { | |
console.log('Success') | |
var enumerator = actions.getEnumerator(); | |
while (enumerator.moveNext()) { |
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 context = SP.ClientContext.get_current() | |
var web = context.get_web() | |
var actions = web.get_userCustomActions(); | |
context.load(web) | |
context.load(actions) | |
context.executeQueryAsync( | |
function () { | |
var newAction = actions.add(); |
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 context = SP.ClientContext.get_current(); | |
var web = context.get_web(); | |
var currentList = web.get_lists().getById(_spPageContextInfo.pageListId); | |
var currentListItem = currentList.getItemById(_spPageContextInfo.pageItemId); | |
context.load(currentListItem); | |
context.executeQueryAsync( | |
function(){ | |
console.log('Success') | |
console.log(currentListItem) | |
console.log(currentListItem.get_item('PropertyName')) |