Saturday, October 23, 2010

Create Site Template using Sandbox Solution in SharePoint 2010

There are many way to create Site Template in SharePoint.I used below ways in my development experience.
  1. Site Definition. - SharePoint 2010 (Site Definition project type in VS2010) - SharePoint 2007 (SharePoint Solution Generator create Site Definition & also WSPBuider, VSEWss1.3)
  2. Site Provisioning (Programmatically) - You can create easily Site Template using this way because all controls in your hand (in your code). Add SPList, Delete SPList, Provision Web Part etc.
  3. Site Template - For SharePoint 2010, Site Setting > Save as Site Template. Save as .WSP file in Solution Gallery. - For SharePoint 2007, Site Setting > Save as Site Template OR type /_layouts/Savetmpl.aspx in your web url. Save as .STP file in Solution Gallery.


Now I created Custom Site Template in SharePoint 2010 Sandbox.I refer this link.
You can create Web Template Feature in Sandbox Solution & give scope Site for this feature.
Given link will help for me so I hope it will help you.


Happy Coding!!!

Column Level Security in SharePoint

Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007 support a rich security model that allows administrators to control access to sites and content by assigning permissions to users and groups for a specific securable object (such as site, list, library, folder and even an individual document or item).

Currently, SharePoint does not provide out of the box support for securing columns or views.
Here there is good article for securing the columns in SharePoint.
(
http://www.infoq.com/articles/Dressel-Gogolowicz-wss-security)

Its working because I used in SPList & Discussion Board.
But there is limitation for lookup field (255 characters) so you can secure item's fields value up to 255 char.

Tuesday, October 19, 2010

Using JQuery Get SharePoint Login User from SharePoint Site

Now Easy to get SharePoint Login User from SharePoint Site

Upload "jquery-1.3.2.min.js" & "jquery.SPServices-0.5.7.min.js"

"jquery.SPServices-0.5.7.min.js" is available here


Add below lines in Javascript Tag & get SharePoint Login User using $().SPServices.SPGetCurrentUser()

$(document).ready(function() {
alert($().SPServices.SPGetCurrentUser());
});


Happy Coding !!!

Friday, October 1, 2010

Sandbox Solutions Support Elements

Capabilities and Elements in Sandboxed Solutions
Sandboxed solutions support the following capabilities and elements:

  • List Definitions

  • List Instances

  • Onet.xml

  • WebTemplate feature elements (instead of Webtemp.xml)

  • Content Types/Fields

  • Navigation

  • Module/files

  • Feature callouts

  • Web Parts

  • Support for all Web Parts that derive from System.Web.UI.WebControls.WebParts.WebPart

  • Event receivers

  • SPItemEventReceiver

  • SPListEventReceiver

  • SPWebEventReceiver

  • Custom actions

  • Declarative workflows




Sandboxed solutions do not support the following capabilities and elements:



  • Visual Web Parts

  • Application Pages

  • Custom Action Group

  • HideCustomAction element

  • Content Type Binding

  • Web Application-scoped features

  • Farm-scoped features

  • Workflows with code