Skip to main content

Posts

Showing posts from 2011

SharePoint Online Plans: Usage Rights

http://blog.mikehacker.net/2011/11/21/sharepoint-online-plans-usage-rights/ High-Level usage rights comparison across user subscriptions plans (12/21/2011) Feature Partner Access Plan (external partners) SharePoint Online Kiosk 1 and Kiosk 2 SharePoint Online E1 and E2 SharePoint Online E3 and E4 SharePoint Online Plan 1 SharePoint Online Plan 2 Can access all team sites by default? No 1 Yes Yes Yes Yes Yes My Site No No Yes Yes Yes Yes Enterprise Features (Access, Business Connectivity Services (BCS), InfoPath Forms, Excel and Visio Services) Yes 2 Yes 3 No Yes 2 No Yes 2 Office Web Apps View only K1 – View only K2 – View and edit E1 – View only E2 – View and edit View and edit View only View only Adds storage to the company’s overall pooled quota? No No Yes. 500MB per user subscription license Yes. 500MB per user subscription license Yes. 500MB per user subscription license Yes. 500MB per user subscription license Can be an administrator of tenant, site or site collection...

SharePoint 2010 CSS Chart

SharePoint 2010 CSS Chart CSS Comments Screenshots body #s4-ribboncont{background-image:none;} /*Globally turning off bordersThis is needed to have any of the style below to take effect. .ms-cui-groupSeparator {border-right:1px solid #E7E7E8 !important; } .ms-cui-topBar2{border-width:0px;}*/ /*Turn on separators in the Ribbon .ms-cui-ribbonTopBars{ background: red url() repeat-x !important; padding-top:0px; } /* Set the background for the tabs at the top (Browse / Page) */ .ms-cui-cg-i{ background-image:url() !important; background-position:bottom left; background-repeat:no-repeat !important; height:15px; margin-bottom:2px; } .ms-cui-cg-db .ms-cui-cg-t{height:17px; background-image:url(‘http://integration.echn.ca/Media/SiteImages/bgBackground.gif’) !important; background-position:bottom right !important; background-repeat:no-repeat !important; margin-left:4px;} .ms-cui-cg-t-i{ color:white; font-weight:bold; } .ribbon-wrapper{position:relative;} /* Set the background for the ad...

WinForm SharePoint List Item Editing Tool

Use the   WinForm SharePoint List Item Editing Tool   if you want to work with SharePoint lists in batch. Without the need to create additional datasheet views, you can use this tool from your workstation to add and remove columns to a grid view. You can paste data from Excel and perform other batch functions such as checking in a selection of documents or importing a batch of documents. If you have event receivers on a list that fire when an item is added or modified, this tool will allow you to suppress those events when working in batch mode.

SharePoint Enable RMS Using Object Model

Step 1 Enable IRM on the farm SPWebService svc = SPFarm.Local.Services.GetValue (); SPIrmSettings irmSettings = svc.IrmSettings; irmSettings.IrmRMSEnabled = true; //set true or false based on the situation irmSettings.IrmRMSUseAD = true; irmSettings.IrmRMSCertServer = "certificate server here"; irmSettings.IrmChanges = irmSettings.IrmChanges + 1; svc.Update(); Step2 Set the IRM properties for a document library SPSite site = new SPSite("http:////"); SPList spList = site.OpenWeb().Lists["list_name"]; SPFolder folder = spList.RootFolder; spList.IrmEnabled = true; //corresponds to "Restrict permission to documents in this library on download" // BELOW SET=2, RESET=0 folder.Properties["vti_irm_IrmPrint" ] = 2; // Allow users to print documents folder.Properties["vti_irm_IrmVBA" ] = 2; // Allow users to access content programmatically folder.Properties["vti_irm_IrmOffline"...

Add an existing site collection Group to sub site with modified Roles

OBJECTIVE The site collection contains a group named “All Members” with “Contributor” privilege. I want to add this group programmatically to a sub site and modify its roles from “ Contributor ” to “ Read ” without modifying the original group. The following are the variables used in the code:        -            site: the SPSite object of the site collection being used -            web: the SPWeb object of the sub site you want to add the group to. SOLUTION: SPGroup  group = site.RootWeb.SiteGroups[ "All Members" ]; SPRoleAssignment  roleAssignment =  new   SPRoleAssignment (group); SPRoleDefinition  roleDefinition = site.RootWeb.RoleDefinitions[ "Read" ]; roleAssignment.RoleDefinitionBindings.Add(roleDefinition); if  (!web.HasUniqueRoleAssignments)       web.BreakRoleInheritance( true ); web...

Start User Profile Synchronization Service through Powershell cmd

Function ConvertTo-UnsecureString ([System.Security.SecureString]$string)    {    $unmanagedString = [System.Runtime.InteropServices.Marshal]::SecureStringToGlobalAllocUni code($string)     $unsecureString = [System.Runtime.InteropServices.Marshal]::PtrToStringUni ($unmanagedString)       [System.Runtime.InteropServices.Marshal]::ZeroFreeGlobalAllocUnicode ($unmanagedString)             return $unsecureString      } $syncMachine = Get-SPServer "sp2010dev" $profApp = Get-SPServiceApplication | where {$_.Name -eq "User Profile Service Application 1"} $account = Get-Credential "localdev\spfarm" if ($syncMachine.Address -eq $env:ComputerName) {     $syncSvc = Get-SPServiceInstance -Server $env:ComputerName | where {$_.TypeName -eq "User Profile Synchronization Service"}     $syncSvc.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Pr...

Start User Profile Synchronization Service through Powershell cmd

Function ConvertTo-UnsecureString ([System.Security.SecureString]$string)    {    $unmanagedString = [System.Runtime.InteropServices.Marshal]::SecureStringToGlobalAllocUni code($string)     $unsecureString = [System.Runtime.InteropServices.Marshal]::PtrToStringUni ($unmanagedString)       [System.Runtime.InteropServices.Marshal]::ZeroFreeGlobalAllocUnicode ($unmanagedString)             return $unsecureString      } $syncMachine = Get-SPServer "sp2010dev" $profApp = Get-SPServiceApplication | where {$_.Name -eq "User Profile Service Application 1"} $account = Get-Credential "localdev\spfarm" if ($syncMachine.Address -eq $env:ComputerName) {     $syncSvc = Get-SPServiceInstance -Server $env:ComputerName | where {$_.TypeName -eq "User Profile Synchronization Service"}     $syncSvc.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Pr...

Get All SubWebs using Client Object Model

  static string mainpath = "http://triad102:1001";         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();     ...

Joins in SharePoint COM

private void GetParts( string searchSku) { Parts.Clear(); List partsList = clientContext.Web.Lists.GetByTitle( "Parts" ); List inventoryLocationsList = clientContext.Web.Lists.GetByTitle( "Inventory Locations" ); CamlQuery camlQueryPartsList = new CamlQuery(); camlQueryPartsList.ViewXml = @"<View> <Query> <Where> <BeginsWith> <FieldRef Name='SKU' /> <Value Type='Text'>" + searchSku + @"</Value> </BeginsWith> </Where> </Query> </View>" ; CamlQuery camlQueryInvLocationList = new CamlQuery(); camlQueryInvLocationList.ViewXml = @"<View> <Query> <Where> <BeginsWith> <FieldRef Name='PartLookupSKU' /> <Value Type='Lookup'>" +...

Get ALL ListNames through Client object Model

ClientContext clientContext =             new ClientContext( "http://intranet.contoso.com" );         ListCollection listCollection = clientContext.Web.Lists;         clientContext.Load(             listCollection,             lists => lists                 .Include(                     list => list.Title,                     list => list.Hidden)                 . Where(list => ! list.Hidden)   ...

Client Object Model Sample

Get All List Items : ClientContext clientContext = new ClientContext( "http://intranet.contoso.com" ); List list = clientContext.Web.Lists.GetByTitle( "Announcements" ); CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = "<View/>" ; ListItemCollection listItems = list.GetItems(camlQuery); clientContext.Load(list);clientContext.Load(listItems); clientContext.ExecuteQuery(); foreach (ListItem listItem in listItems) Console.WriteLine( "Id: {0} Title: {1}" , listItem.Id, oListItem[ "Title" ]); Creating List using COM, Add Fields and populate Data: ClientContext clientContext = new ClientContext( "http://intranet.contoso.com" ); Web site = clientContext.Web; // Create a list. ListCreationInformation listCreationInfo = new ListCreationInformation(); listCreationInfo.Title = "Client API Test List" ; listCreationInfo.TemplateType =...

Users AD Browser Webpart

http://usersadbrowser.codeplex.com/

SharePoint 2010 News Rotator

http://newsrotator.codeplex.com/

Using the SharePoint 2010 Silverlight Client Object Model and Excel Services REST API

http://www.deviantpoint.com/post/2010/02/07/Example-Using-the-SharePoint-2010-Silverlight-Client-Object-Model-and-Excel-Services-REST-API.aspx Download: ExcelChartViewerSL.zip (975.87 kb)

SharePoint Multiple files Download as zip file

SharePoint Multiple files Download as zip file The user has selected some documents and a sub-folder so my custom ribbon button is enabled: The user clicks on this button and this feature executes and after it’s complete the user is prompted with this (note, the filename is a timestamp): The user saves it down locally to his computer and sees all the files are there: WSP file (Site collection feature): DeviantPoint.DownloadZip.wsp (84.84 kb) Visual Studio 2010 Project file: DeviantPoint.DownloadZip.zip (317.01 kb)

Exchange WebPart for SharePoint 2010

Exchange WebPart for SharePoint 2010

"Take a picture" Field for SharePoint 2010

"Take a picture" Field for SharePoint 2010