Skip to main content

Posts

Working with SharePoint folder properties using CSOM (Client Side Object model ) in SharePoint 2013

  Accessing folder properties are but different from  SharePoint list item access. Following code demonstrates  the basics. Create SharePoint Folder with Properties using (var clientContext = ypurMethodToGetSpContectt() ) {   var lst = clientContext.Web.Lists.GetByTitle( "ListName" ); var folder = lst.RootFolder.Folders.Add( "FolderName" ); folder.Properties[ "property1" ] = "sample" ; folder.Properties[ "property1" ] = "sample" ;   folder.Update(); clientContext.ExecuteQuery();   }

SharePoint 2013 Licensing model

SharePoint 2013 licensing model has changed bit for user scenarios. it has been slightly change from the SharePoint 2010 server user licensing model. SharePoint Server should be license under two categories. Server License Client Access License (CAL) Server License Each SharePoint server in the farm should be license under SharePoint server license. Apart from the windows server licenses, SharePoint server should be licensed. This can be done when the time of installation of the SharePoint server. The SQL servers in the SharePoint farm should be installed according to the SQL server licensing model. Client Access License (CAL) After that SharePoint farm should hold licenses for client access. These licenses are reviewed in the audit process and does not require any key in activation. Depending on the user accessing organization requires to have CALs. Intranet and Extranet CAL requirements Assume organization setup a intranet and which is having users from internal AD , auth...

How to add/update SharePoint user field (person group column) using ECMA Scripts

  SharePoint app model supports enough capability to work with SharePoint from JavaScript. Working with Person Group column is a common task in SharePoint development. Following illustrates how to  update  a single and multiple values to  SharePoint person group column. Insert / Update Single Value SharePoint Person Group Column (People Field) Tip: For single value you should refer the person or group by ID var user = new SP.FieldUserValue(); user = 1; // this is the ID for User or Group in SharePoint listitem.set_item( "Column Name" , user); listitem.Update(); ctx.ExecuteQuery(); Insert / Update Multi Value SharePoint Person Group Column (People Field) Tip: For multiple users you need to refer it by login name var users =[];   users.push(SP.FieldUserValue.fromUser( "dev Members" )); // adding group users.push(SP.FieldUserValue.fromUser( "i:0#.f|membership|melick@oapp.onmicrosoft.com" )); // adding user   listitem.set_item( "Column Name...

Session on SharePoint App Architectural View

Audience: 20+

Programmatically Change Default Content Type in SharePoint 2013 List

  SharePoint list does not have any direct property or method to make content type default. but it is having content type ordering. thus making content type in first of the list automatically makes that content type default. following shows a sample code using (var site = new SPSite( "url" )) { using (var web = site.AllWebs[ "yourweb" ]) { var lst = web.Lists[ "Your List" ]; SPContentTypeCollection currentOrder = lst.ContentTypes;   // make default content type var newOrder = currentOrder.Cast<SPContentType>().Where(ct => ct.Name.Contains( "Content Type To Default" )).ToList(); lst.RootFolder.UniqueContentTypeOrder = newOrder; lst.RootFolder.Update(); } }    

The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator.

  I noticed this error when I logged to SharePoint farm; Meta Data service application. Tasks going to perform Get the Current Mapped Data Base for Managed Meta Data Service Backup Data Base and get the name Delete Meta Data Service Application with out Data Base Create a New Managed Meta Data Service with new Application Pool Change the Data base reference to old database When I googed I found few resolutions which didn’t work for me. so I tried a slightly different approach which worked for me. Get the Current Mapped Data Base for Managed Meta Data Service Go to central admin and navigate to Manage Meta Data Service properties to find out mapped data base. Then go to your database server and backup the database for recovery purposes. (this step is not mandatory but good for safe side) Delete Meta Data Service Application with out Data Base Create a New Managed Meta Data Service with new Application Pool When you creating specify a new data base name ( DB1 )...

An error occurred while talking to SMTP host mail.something.local Event ID 6858

this error occurred to me when I setup SMTP virtual sever for SharePoint farm. then I tried to trouble shoot email sending using PowerShell and it also return False . Trouble shooting SharePoint Emails (SMTP server)  $dict = new - object System.collections.specialized.stringdictionary // recipient's Email Address $dict .add( "to" , "somebosy@gmail.com" ) // sender: you can put anything that you want to visible in the email $dict .add( "from" , "outsender@sharepoint.local" ) $dict .add( "Subject" , "sample subject" ) // this is any existing sp web url $web = get-spweb "http://4587wfe2013:5003" $body = "This is our body codes in it." [Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,$sd,$body) This code will return True if success otherwise will be False . This error occurred me because of connection issues to SMTP server. thus I go to SMTP properties   Then go to Access Tab and click Conne...