Posts

Showing posts from February, 2018

SharePoint Dynamic CRUD Operations using Rest API

SharePoint Dynamic CRUD Operations using Rest API Use the below code for dynamic CRUD operations. You can create CRUD.js file using the below code & call the crud operations from different places by passing different parameters. //<<<<<<<<<<<<<<<<<<<<<<<< NOTE - Follow the below instructions to call the CURD Functions >>>>>>>>>>>>>>>>>>>>>>>>>      //-----------------createItem('ListName',['ColumnName1','ColumnName2',...],['Value1','Value2',...]);-------------          //Example: createItem('testlist',['Title','Name','Age'],['ABC','XYZ',10]);           //-----------------updateItem('ListName',itemID,['ColumnName1','ColumnName2',...],['Value1','Value2',...]);------          //Example: updateIt

Enable SharePoint Read only columns of List/Library

Image
Enable SharePoint Read only columns of List/Library Some times under SharePoint List/Library settings columns are not enabled(Greyed out) to edit or delete. Using below jsom code we can enable the readonly columns. For this you need to proide below inputs 1.List Name 2.ContentType ID whitch the column is associated 3.Any substring of column name (example: If column name is 'Country Name' -> you can type 'Country') Here we can get the content type id from list settings if we click content type from URL we can get content type ID We need to add Script editor web part & insert the below code. < html > AnySubStringofColumnName: < input type = "text" id = "txtColName" />< br />< br /> ListName: < input type = "text" id = "txtListName" />< br />< br /> ContentTypeID: < input type = "text" id = "txtContentType" />< br /><