Skip to content

Instantly share code, notes, and snippets.

View vman's full-sized avatar
👨‍💻

Vardhaman Deshpande vman

👨‍💻
View GitHub Profile
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.WorkflowServices;
using System.Collections.Generic;
using System.Linq;
using System.Security;
namespace CSOMWorkflow
{
class Program
{
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.WorkflowServices;
using System.Collections.Generic;
using System.Linq;
using System.Security;
namespace CSOMWorkflow
{
class Program
{
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
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
{
{
"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"
{
"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",
{
"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,
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
{
SPRemoteEventResult result = new SPRemoteEventResult();
using (ClientContext clientContext = TokenHelper.CreateAppEventClientContext(properties, useAppWeb: false))
{
if (clientContext != null)
{
Web hostWeb = clientContext.Web;
@vman
vman / jsom.js
Last active August 29, 2015 14:05
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();
@vman
vman / jsomwf.js
Last active August 29, 2015 14:05
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();