Skip to content

Instantly share code, notes, and snippets.

@devendrasv
devendrasv / Elements.xml
Last active December 11, 2015 05:28
Content Type Elements.xml file
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Item (0x01) -->
<ContentType ID="0x0100118703F0484042118516B33BD9488ECB" Name="ContentType-Object Model" Group="SharePoint-Journey" Description="My Content Type" Inherits="TRUE" Version="0">
<FieldRefs>
<FieldRef ID="{a4a8c94a-6a0d-4ef2-880d-a049720e2a73}"
DisplayName="Team Name"
Required="TRUE"
Name="Team_x0020_Name" />
<FieldRef ID="{2f6753f2-1584-477a-868e-d75ead1aaa07}"
@devendrasv
devendrasv / Elements.xml
Last active December 11, 2015 04:18
site column Elements.xml
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field
ID="{779bdd44-c459-49cd-8265-3190420c7633}"
Name="Team_x0020_Name"
DisplayName="Team Name"
Type="Text"
Required="FALSE"
Group="Custom Site Columns">
</Field>
@devendrasv
devendrasv / App.js
Created January 11, 2013 00:32
basic-App.js
var context;
var web;
var user;
// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
$(document).ready(function () {
context = SP.ClientContext.get_current();
web = context.get_web();
getUserName();