Skip to main content

Posts

Java Script code to clear All value in SharePoint 2010, 2013

function ClearAllPeopleFields() { var blankValue= " "; clearpeoplefield("Retoucher",blankValue);     clearpeoplefield("Ingestor",blankValue);     clearpeoplefield("MR Contact #1",blankValue);     clearpeoplefield("MR Contact #2",blankValue);     clearpeoplefield("MR Contact #3",blankValue);     clearpeoplefield("MR Contact #4",blankValue);     clearpeoplefield("Legal Contact #1",blankValue);     clearpeoplefield("Legal Contact #2",blankValue);     clearpeoplefield("Legal Contact #3",blankValue);     clearpeoplefield("Legal Contact #4",blankValue);              clearpeoplefield("Account Manager",blankValue);              clearpeoplefield("Metadata",blankValue);              clearpeoplefield("Photo Editor",blankValue); }

SPServices Code Get Items From List in SharePoint 2013, 2010

$().SPServices({         operation: "GetListItems",         listName: "Episode Profile",         CAMLViewFields: "<ViewFields>"+          "<FieldRef Name='AirDate' /><FieldRef Name='Focus_x0020_ID' /><FieldRef Name='MR_x0020_Contact_x0020__x0023_1' /><FieldRef Name='MR_x0020_Contact_x0020__x0023_2' />"+          "<FieldRef Name='PhotoEditor' /><FieldRef Name='AccountManager' /><FieldRef Name='Ingestor' /><FieldRef Name='Retoucher' /><FieldRef Name='Metadata' />"+          "</ViewFields>",                 CAMLQuery: "<Query><Where><Eq><FieldRef Name='ID'/><Value Type='Number'>"+ epid +"</Value></Eq></Where></Query>",          ...

Code To Save the Items in SharePoint Using SP Service : All type of columns

//***********************************************Code Start***************************************************** $(document).ready(function() { //**********Enable/Disable Approval Required By PE field, based on Type of Request selection $("input:radio[name=ctl00$m$g_0114c063_901b_4b52_ba51_625c6af34065$ff41$ctl00$RadioButtons]").change(function() { var value = $(this).val(); if (value =="ctl00" || value =="ctl01" ) { $('input:checkbox[name=ctl00$m$g_0114c063_901b_4b52_ba51_625c6af34065$ff181$ctl00$ctl00$BooleanField]').attr('checked', true); $("input[title='Approval Required By PE']").removeAttr("disabled"); } else { $('input:checkbox[name=ctl00$m$g_0114c063_901b_4b52_ba51_625c6af34065$ff181$ctl00$ctl00$BooleanField]').attr('checked', false); $("input[title='Approval Required By PE']").attr("disabled", "disabled");...