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
/* | |
Hit 'ctrl + d' or 'cmd + d' to run the code, view console for results | |
*/ | |
import { sp } from "@pnp/sp/presets/all"; | |
(async () => { | |
console.clear() | |
const list = sp.web.lists.getByTitle("CB_Progress") | |
const items = await list.items.getAll() |
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
param( | |
[OutputType([string[]])] | |
[Parameter(Mandatory=$true)] | |
[string] | |
$SPOSiteUrl | |
) | |
Connect-PnPOnline -url $SPOSiteUrl -AppId 05f5eb20-13c1-4ce6-a992-bf697f03740a -AppSecret iCdfbFvD/mzkxvOH2JgY1afbZ6mf0zaDK+W3uzaNs8o= |
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
{ | |
"type": "object", | |
"properties": { | |
"webUrl": { | |
"type": "string" | |
}, | |
"webDescription": { | |
"type": "string" | |
}, | |
"creatorName": { |
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
const listName = "My_New_List"; //<== Update the listName | |
const listDescription = "Description of why the List exists"; | |
| |
// using @pnp/sp | |
import { sp } from "@pnp/sp/presets/all"; | |
| |
// Add List | |
// create list | |
async function createList(){ | |
const listAddResult = await sp |
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
const textFields = [ | |
"fieldName1", | |
"fieldName2", | |
"fieldName3" | |
] | |
| |
const listName = "My_List_Name"; //<== Update the listName | |
| |
// using @pnp/sp | |
import { sp } from "@pnp/sp/presets/all"; |
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
me/settings('contributionToContentDiscoveryDisabled') | |
{6cadb877-5488-4b33-b19f-3bf6c53befb7}/settings('contributionToContentDiscoveryDisabled') |
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
// Write a function that takes a URL like: test.com/post/12xy5id-hello-and-welcome | |
// And converts it into "Hello and Welcome". | |
// - Don't include tokens that start with numbers | |
// - If a token is 3 characters or less, don't capitalize it | |
function outputMessage(input) { | |
const tempArray = input.split('-'); //['12..', 'hello', 'and', 'welcome'] | |
let finalArray = []; |
This file has been truncated, but you can view the full file.
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
(window["noconflictJsonp"] = window["noconflictJsonp"] || []).push([["vendors~main"],{ | |
/***/ "./node_modules/@pnp/common/dist/common.es5.js": | |
/*!*****************************************************!*\ | |
!*** ./node_modules/@pnp/common/dist/common.es5.js ***! | |
\*****************************************************/ | |
/*! exports provided: AdalClient, SPFxAdalClient, objectToMap, mergeMaps, setup, RuntimeConfigImpl, RuntimeConfig, mergeHeaders, mergeOptions, FetchClient, BearerTokenFetchClient, PnPClientStorageWrapper, PnPClientStorage, getCtxCallback, dateAdd, combine, getRandomString, getGUID, isFunc, objectDefinedNotNull, isArray, extend, isUrlAbsolute, stringIsNullOrEmpty, getAttrValueFromString, sanitizeGuid, jsS, hOP, getHashCode */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; |
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(modules) { // webpackBootstrap | |
/******/ // install a JSONP callback for chunk loading | |
/******/ function webpackJsonpCallback(data) { | |
/******/ var chunkIds = data[0]; | |
/******/ var moreModules = data[1]; | |
/******/ var executeModules = data[2]; | |
/******/ | |
/******/ // add "moreModules" to the modules object, | |
/******/ // then flag all "chunkIds" as loaded and fire callback | |
/******/ var moduleId, chunkId, i = 0, resolves = []; |
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
// see: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-rest-api#getsitescriptfromlist | |
function RestRequest(url,params) { | |
var req = new XMLHttpRequest(); | |
req.onreadystatechange = function () | |
{ | |
if (req.readyState != 4) // Loaded | |
return; | |
console.log(JSON.parse(req.responseText).value); | |
}; |
NewerOlder