Skip to content

Instantly share code, notes, and snippets.

View devendrasv's full-sized avatar

Devendra Velegandla devendrasv

View GitHub Profile
@devendrasv
devendrasv / Elements.xml
Created March 10, 2017 07:35
Your First Add-in: Travel Request CT
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Item (0x01) -->
<ContentType ID="0x0100397A991AA8694C4BB4A12055B56F400E" Name="TravelRequestCT" Group="Custom Content Types" Description="My Content Type" Inherits="TRUE" Version="0">
<FieldRefs>
<FieldRef ID="{33e756a8-1701-463c-aa78-ca573f78393a}" DisplayName="Request Status" Required="FALSE" Name="RequestStatus" Format="Dropdown" />
<FieldRef ID="{bbd79258-7ba1-4a48-acbb-1f7de3b385cb}" DisplayName="Request Number" Required="FALSE" Name="RequestNumber" />
<FieldRef ID="{7df4e16c-5fa1-4b4d-9c7e-49b717ca866f}" DisplayName="Urgent" Name="Urgent" />
<FieldRef ID="{7d8cc55e-241d-4a18-b6c9-4031059b5dbc}" DisplayName="Visiting Contact Details" Required="TRUE" Name="VisitingContactDetails" NumLines="6" Sortable="FALSE" />
<FieldRef ID="{7c265805-c570-403a-90ac-1eca2944c5a7}" DisplayName="Reason for Trip" Required="TRUE" Name="ReasonForTrip" NumLines="6" So
@devendrasv
devendrasv / Elements.xml
Last active March 10, 2017 07:34
Your First Add-in: Travel Request site columns
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field Type="Choice"
DisplayName="Travel Request Status"
Required="FALSE"
Format="Dropdown"
FillInChoice="FALSE"
Group="Travel Request"
ID="{c33db2b3-0af9-4f5a-bbbe-fa60739aff94}"
Name="TravelRequestStatus">
@devendrasv
devendrasv / Elements.xml
Created March 10, 2017 06:54
Your First Add-in : Site Columns
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field
ID="{2fa0c905-6d36-4ffe-b910-cd62cc521be4}"
Name="SiteColumns"
DisplayName="Site Columns"
Type="Text"
Required="FALSE"
Group="Custom Site Columns">
</Field>
<%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ID="Content2" ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<script type="text/javascript" src="../_layouts/15/sp.runtime.js"></script>
<script type="text/javascript" src="../_layouts/15/sp.js"></script>
<sc
<%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ID="Content2" ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<script type="text/javascript" src="../_layouts/15/sp.runtime.js"></script>
<script type="text/javascript" src="../_layouts/15/sp.js"></script>
<sc
@devendrasv
devendrasv / AssociationFormBefore.aspx
Created July 3, 2015 05:29
Association Form Before
<%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" MasterPageFile="~masterurl/default.master" Language="C#" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WorkflowServices" Namespace="Microsoft.SharePoint.WorkflowServices.ApplicationPages" Assembly="Microsoft.SharePoint.WorkflowServices.ApplicationPages, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Cont
@devendrasv
devendrasv / AssociationForm.aspx
Last active August 29, 2015 14:24
Association Form
<%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" MasterPageFile="~masterurl/default.master" Language="C#" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WorkflowServices" Namespace="Microsoft.SharePoint.WorkflowServices.ApplicationPages" Assembly="Microsoft.SharePoint.WorkflowServices.ApplicationPages, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Cont
@devendrasv
devendrasv / Provision Site Collection termsets and terms.ps1
Created October 5, 2014 01:15
Provision Site Collection termsets and terms in office 365 using Powershell and CSOM
#Credentials to connect to office 365 site collection url
$url ="https://velegandla.sharepoint.com/sites/training"
$username="spj@Velegandla.onmicrosoft.com"
$password="yourpassword"
$Password = $password |ConvertTo-SecureString -AsPlainText -force
Write-Host "Load CSOM libraries" -foregroundcolor black -backgroundcolor yellow
Set-Location $PSScriptRoot
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll")
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.Runtime.dll")
@devendrasv
devendrasv / Provision taxonomy group for site collection.ps1
Created October 5, 2014 00:50
Provision taxonomy group for site collection
#Credentials to connect to office 365 site collection url
$url ="https://velegandla.sharepoint.com/sites/training"
$username="spj@Velegandla.onmicrosoft.com"
$password="yourpassword"
$Password = $password |ConvertTo-SecureString -AsPlainText -force
Write-Host "Load CSOM libraries" -foregroundcolor black -backgroundcolor yellow
Set-Location $PSScriptRoot
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll")
@devendrasv
devendrasv / checkSitecollectionTaxonomygroup.ps1
Last active August 29, 2015 14:07
check if Site collection Taxonomy group exists
#Credentials to connect to office 365 site collection url
$url ="https://velegandla.sharepoint.com/sites/training"
$username="spj@Velegandla.onmicrosoft.com"
$password="yourpassword"
$Password = $password |ConvertTo-SecureString -AsPlainText -force
Write-Host "Load CSOM libraries" -foregroundcolor black -backgroundcolor yellow
Set-Location $PSScriptRoot
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll")
Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.Runtime.dll")