Posts

Showing posts from December, 2011

Update hyperlink filed value Using ObjectModel

SPListItem olistitem= oList.GetItemById(itemidvalue); SPFieldUrlValue FiledUrl= new SPFieldUrlValue(); FiledUrl.URL = "http://Url"; FiledUrl.Description = "URL"; olistitem["HyperLinkColumName"] = FiledUrl ; olistitem.update();

SharePoint 2010 central Administration

Application Management : Manage site collections, web applications, content databases, and the new service applications System Settings: Manage servers, features, solutions, and farm-wide settings Monitoring: Track, view and report the health and status of your SharePoint farms Backup and Restore: Performs backup or restores Security: Manage settings for users, policy, and global security Upgrade and Migration : Upgrade SharePoint, add licenses, enable Enterprise Features General Application Settings: Anything that doesn’t fit into one of the other sections Configuration Wizards: These are nice wizards to help setup or modify the farm

SP2010 User Interface Changes

Click Here

SP2010 Timer Jobs Overview

Image
SharePoint 2010 Timer Jobs undergo changes are in the management and in configuration. Firstly, the most significant change you will see is that the number of Timer Jobs – new 21 jobs been added. If for an ordinary SharePoint 2007 application we had 39 Timer’s Job, then we have 60 Jobs for SharePoint 2010 So, those 21 new timer jobs are: Application Addresses Refresh Job Audit Log Trimming Delete Job History Document ID enable/disable job Document ID assignment job Enterprise Server Search Master Job Health Analysis Job InfoPath Forms Services Maintenance Password Management Prepare query suggestions Product Version Job Query Logging Secure Store Service Timer Solution Daily Resource Usage Update State Service Delete Expired Sessions Timer Service Recycle Web Analytics Trigger Workflows Timer Job Windows SharePoint Services Usage Data Import Windows SharePoint Services Usage Data Processing Word Conversion Timer Job Workflow Timer Jobs management belon

Using SPQuery and CAML to filter and order

To get a collection of items from a list you can use SPQuery and CAML to filter and order the selected list: SPSite oSite = SPContext.Current.Site;             SPWeb oWeb = oSite.OpenWeb();             SPList oList = oWeb.Lists["ListName"];             SPQuery oQuery = new SPQuery();             oQuery.Query = "<OrderBy><FieldRef Name='Title' /></OrderBy><Where>"                 + "<FieldRef Name='Title' /><Value Type='Text'></Value></Where>";             SPListItemCollection oItems = oList.GetItems(oQuery); To filter on date use the following to get any item that has been modified in the last 7 days: string dateString = Microsoft.SharePoint.Utilities. SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.Today.AddDays(-7)); oQuery.Query = <Where><Geq><FieldRef Name=\"Modified\"/><Value Type=\"DateTime\">"+ dateString+

Get All Sub Webs Using Client Object Model in SharePoint 2010

 static string mainpath = "http://SiteURL";         static void Main(string[] args)         {             getSubWebs(mainpath);             Console.Read();         }         public static  void  getSubWebs(string path)         {                     try             {                 ClientContext clientContext = new ClientContext( path );                 Web oWebsite = clientContext.Web;                 clientContext.Load(oWebsite, website => website.Webs, website => website.Title);                 clientContext.ExecuteQuery();                 foreach (Web orWebsite in oWebsite.Webs)                 {                     string newpath = mainpath + orWebsite.ServerRelativeUrl;                     getSubWebs(newpath);                     Console.WriteLine(newpath + "\n" + orWebsite.Title );                 }             }             catch (Exception ex)             {                           }                           }

SharePoint 2010: Add button to Ribbon with SharePoint designer

Click Here

Progress Bar for Tasks List in SharePoint 2010

Image
Now we are going to see how to show the progress of tasks in SharePoint We are going achieve this with the help of Calculated Columns. The [% Complete] is a default column in tasks lists. We just need to add – in a calculated column - the formulas for this specific use case. Here they are: Progress Bar 1 : =”<DIV style=’background-color:blue; width:”&([% Complete]*100)&”%;’>&nbsp;</DIV>” Progress Bar 2 : =”<DIV style=’background-color:red;’><DIV style=’background-color:LimeGreen; width:”&([% Complete]*100)&”%;’>&nbsp;</DIV></DIV>” Progress Bar 3: ="<DIV style=’position:relative;padding-top:2px; border:1px solid Gainsboro; background-color: " &CHOOSE(RIGHT(LEFT(Priority,2),1), "LightSalmon", "LemonChiffon", "Chartreuse")&";’> <DIV style=’margin:0;padding:0;font-size:0px;border-top:12px solid " &CHOOSE(RIGHT(LEFT(Priority,2),1),&quo

Restrict the delete option from Document Library in sharepoint 2010

public override void ItemDeleting ( SPItemEventProperties properties ) {     using ( SPSite site = new SPSite ( properties . SiteId ))     {         using ( SPWeb web = site . OpenWeb ( properties . RelativeWebUrl ))         {                       if ( properties [ "Title" ] == "SomeTitle" )                 return ;             properties . Cancel = true ;             properties . ErrorMessage = "You cannot delete item" ;         }     } }

SharePoint Permission and Security Mechanisms

Image
SharePoint Permission and Security Mechanisms From time to time, our customers ask us about how SharePoint security and permission features work, and how should they be utilized. In this post we try to walk through the basic permission and security features of SharePoint. This post is not intended to be a complete description of every security and permission related feature in SharePoint, but we try to gather all the essential pieces here. We took many screenshots to illustrate what each setting or feature means in practice, enjoy the ride,   ! Additional Resources: Basics: What are permissions? Farm Administrators Farm Administrators group is a group that is managed centrally via SharePoint Central Administration web-site: Farm Administrators include by default SharePoint Farm -account, SharePoint installation account and BUILTIN\Administrators group. Farm Administrators have basically “all rights” in SharePoint Farm (or at least they have the ability to get them).