Saturday, May 31, 2014

Send notification to Task Owner


Tasks list in SharePoint has very nice feature to send email to owner of particular tasks
You can configure this as below:

1.      Go to Tasks List setting
2.      Advanced settings
3.      Set option in below setting to Yes









4.      Save this setting.

Now whenever Tasks are created /updated in this list mail will be triggered to user or group in Assigned To field for that task item.

Outgoing mail settings should be configured in CA.

Also this feature is also available with Issue list.

Saturday, June 23, 2012

Column validation in SharePoint 2010


SharePoint 2010 list improvement  contains feature to add column level validation in list form as below :


1. If we need to restrict length of title column to 8  characters then we can add validation as below :





















2. We can use below validation for validating Email column with valid  email id
















Excel based validations can be used in column level validation also we can add list level validations in SharePoint 2010.






Friday, September 10, 2010

Change Default Sharepoint site theme

 When you create new sharepoint site using any Template (Team site,Blank Site , Blogs etc.)  default it sets blue colored Theme (i.e Default Theme).

We can change this above default set them to any themes provided by SharePoint (Verdant,Petal etc) .
using below steps.

1. Create layout page (application page) as changeTheme.aspx .
2. In Code behind of page on page load write below code as

protected void Page_Load(object sender, EventArgs e)

{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPWeb web = SPControl.GetContextWeb(Context);

web.AllowUnsafeUpdates = true;

web.ApplyTheme("Verdant");

web.Update();

web.AllowUnsafeUpdates = false;

Response.Redirect(web.Url);

});

}

3. Delpoy this page to layouts Directory .

4. In ONET.XML of Team site template add <ExecuteUrl> tag Inside <Configuration> node as shown

<Configurations>

<Configuration ID="0" Name="Default">
<Lists/>

<Modules/>

<ExecuteUrl Url="_layouts/changeTheme.aspx" />

</Configuration>

<Configurations>

5. Add same <ExecuteUrl> for other templates ONET.XML and Restart IIS.
6. Create Site using Team Site Template ur Site will get created with Theme set to Verdant.
 
Thats it !! Done ...

Tuesday, April 27, 2010

Override JavaScript in SharePoint

We were facing a issue in discussion list in SharePoint as below:

On click of Reply button in SharePoint discussion , users were getting error page.

So we decided to override onclick function i.e. GoToPage .

We wrote javascript block in Flat.aspx in Discusion list Definition to Override default Behavior & in that one wrote script  that will open custom page in Pop-up , user Can easily reply to Discussion.

Script block in Flat.aspx is as below :













In this way you can Override SharePoint javascript functions with the way you want to use it.

Tuesday, February 23, 2010

Register Event Handlers In SharePoint List Definition

There are different ways to register Sharepoint List Event Handlers
If you are creating List Definition & want to register events with list definition.
Register Events within Schema.xml in Content Type Tag
Add XmlDocument Tag Add Recievers Tag in that add Receiver for each event

Refer below screen shot for more info.

Monday, February 22, 2010

Hide Form-fields in sharePoint lists using JQuery

1. Create wiki Library name it as Smple Library.
2. Add wiki page to above wiki library.
3. Now open wiki library in SharePoint Designer.





5. Add jquery code as in diagram.
6. Now open wiki page to edit it. It will display only wiki content in edit mode & Name will be hidden in edit mode.

Hide Menu Items in SharePoint Site

If u want to Hide Some Actions from Actions Menu Like

1. Edit in Datasheet
2. Open with Access
3. view rss feed

If u want to Hide Some Actions from Welcome Menu Like

1. My Settings
2. Personalize this Page
3. Sign in as Different User

Use below Java Script in your SharePoint sites master Page ...

Hide InComing Links in Wiki Page

If you want to hide Incoming Links option in wiki page of wiki Library in Sharepoint

Add below javascript in Master Page of SharePoint Site