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
using Microsoft.SharePoint.Client; | |
using Microsoft.SharePoint.Client.WorkflowServices; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security; | |
namespace CSOMWorkflow | |
{ | |
class Program | |
{ |
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
using Microsoft.SharePoint.Client; | |
using Microsoft.SharePoint.Client.WorkflowServices; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security; | |
namespace CSOMWorkflow | |
{ | |
class Program | |
{ |
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
using Microsoft.SharePoint.Client; | |
using Microsoft.SharePoint.Client.WorkflowServices; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security; | |
namespace CSOMWorkflow | |
{ | |
class Program |
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
using Microsoft.SharePoint.Client; | |
using Microsoft.SharePoint.Client.Workflow; | |
using Microsoft.SharePoint.Client.WorkflowServices; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security; | |
namespace CSOMWorkflow | |
{ |
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
{ | |
"d": { | |
"__metadata": { | |
"id": "https://siteurl.sharepoint.com/sites/test/_api/Web", | |
"uri": "https://siteurl.sharepoint.com/sites/test/_api/Web", | |
"type": "SP.Web" | |
}, | |
"FirstUniqueAncestorSecurableObject": { | |
"__deferred": { | |
"uri": "https://siteurl.sharepoint.com/sites/test/_api/Web/FirstUniqueAncestorSecurableObject" |
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
{ | |
"odata.metadata": "https://siteurl.sharepoint.com/sites/test/_api/$metadata#SP.ApiData.Webs/@Element", | |
"odata.type": "SP.Web", | |
"odata.id": "https://siteurl.sharepoint.com/sites/test/_api/Web", | |
"odata.editLink": "Web", | |
"AllowRssFeeds": true, | |
"AlternateCssUrl": "", | |
"AppInstanceId": "00000000-0000-0000-0000-000000000000", | |
"Configuration": 0, | |
"Created": "2014-05-27T21:02:57", |
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
{ | |
"AllowRssFeeds": true, | |
"AlternateCssUrl": "", | |
"AppInstanceId": "00000000-0000-0000-0000-000000000000", | |
"Configuration": 0, | |
"Created": "2014-05-27T21:02:57", | |
"CustomMasterUrl": "/sites/test/_catalogs/masterpage/seattle.master", | |
"Description": "", | |
"DocumentLibraryCalloutOfficeWebAppPreviewersDisabled": false, | |
"EnableMinimalDownload": false, |
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
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties) | |
{ | |
SPRemoteEventResult result = new SPRemoteEventResult(); | |
using (ClientContext clientContext = TokenHelper.CreateAppEventClientContext(properties, useAppWeb: false)) | |
{ | |
if (clientContext != null) | |
{ | |
Web hostWeb = clientContext.Web; |
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 loadFunction(){ | |
SP.SOD.executeFunc('SP.js', 'SP.ClientContext', getUsers); | |
} | |
var getUsers = function () { | |
var ctx = new SP.ClientContext.get_current(); | |
web = ctx.get_web(); | |
var users = web.get_lists().getByTitle('Users'); | |
var camlQuery = new SP.CamlQuery(); |
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 LoadScripts(){ | |
SP.SOD.executeFunc("sp.js", "SP.ClientContext" , function(){ | |
SP.SOD.registerSod('sp.workflowservices.js', SP.Utilities.Utility.getLayoutsPageUrl('sp.workflowservices.js')); | |
SP.SOD.executeFunc('sp.workflowservices.js', "SP.WorkflowServices.WorkflowServicesManager", StartSiteWorkflow); | |
}) | |
} | |
function StartSiteWorkflow(){ | |
var context = SP.ClientContext.get_current(); |
OlderNewer