Posts

My Task List Rollup Webpart for SharePoint 2010

Download My Task List Rollup Hello all, Here I am again with a new utility for your SharePoint 2010 deployment – “My Task List Rollup”. Some time before I was wondering to get all tasks on my landing page of SharePoint 2010 site. I searched everywhere but I didn’t get it. But now I have created Task List Rollup. This shows tasks from all sites/sub sites. My Task List Rollup is free to use. It works on Site Collection level. Here you will get a setup which installs this rollup & activate feature (My Task List (Cross Site)) of this rollup. When you will add My Task List Rollup on your page & modify setting of web part you will get a web part property section called “ My Task Rollup Configuration ”. In this section you can set paging size. Download My Task List Rollup

How to enable/disable buttons in ribbon conditionally?

Image
In this article I will cover how we can enable and disable the controls from ribbon based on any specific column value. For an instance I have a list column "State", if selected row is having status "active" then and then button should be enable in Ribbon, otherwise ribbon button should remain disable. For how to write Ribbon declaration please refer my previous articles. In above image you can see we have one button "New" in ribbon within group "Console". Please refer the source code for Ribbon's declaration. We are going to use delegate control for injecting ECMA script on fly for desired list. Below are the events causes ribbons to refresh so button can be turned enable/disable. Checkbox from every row SelectAll/DeselectAll checkbox from header row On every row select On each of above events after executing their respective functionality they instruct the ribbon to refresh. On received of refresh event ribbon calls Enable script

Truncate and shrink Transaction Log file in SQL Server 2008

In SQL Server this process have been changed. In 2008, just change the recovery model to simple and then use DBCC Shrinkfile command. Now follow these steps to shrink database file. Truncate the log by changing the database recovery model to SIMPLE            ALTER DATABASE [<Your Database Name>]             SET RECOVERY SIMPLE;            GO Shrink the truncated log file to 5 MB            DBCC SHRINKFILE ([<Your Database Name>_Log], 5);            GO Reset the database recovery model.           ALTER DATABASE [<Your Database Name>]           SET RECOVERY FULL;           GO NOTE: Don't leave your database Recovery in " SIMPLE " mode. This will cause some problems when u try to delete Site Collection from SharePoint Central Administration. Always keep it in "FULL" mode .

Error occurred in deployment step ‘Retract Solution’: The language-neutral solution package was not found.

We sometimes get this error when deploying SharePoint 2010 solutions from Visual Studio 2010: Error occurred in deployment step ‘Retract Solution’: The language-neutral solution package was not found. To resolve this error user Powershell : Run Powershell. Ensure you have Sharepoint Powershell commands enabled For that run following command Add-PSSnapin Microsoft.SharePoint.Powershell   run following command (Replace mysolution.wsp with your solution name) (get-spsolution mysolution.wsp).Delete()

Enable Sandboxed Solutions in SharePoint2010

Image
I was trying to write a simple browser enabled InfoPath form with code behind and like to get this run as Sandboxed solution in SharePoint 2010. When I was publishing this form following error was thrown : "The form template cannot be published to the Server:MyServerName.Sandboxed Solutions are not enabled on the SharePoint Server Form." I was searching for this & I found that "Microsoft SharePoint Foundation User Code Service" is required to run the Sandboxed solution to work. To enable this service go to Central Administration and in Services Section click on Manage Services on Server, start "Microsoft SharePoint Foundation User Code Service".

Send Email From Document Library

Downalod Send email from document library Hello all, Here I am again with a new utility for your SharePoint deployment – “Send Document as an email attachment”. This utility will allow defined set of users to send any document from any document library via email, as an attachment. After deploying this solution, a new button “Send Document” will appear in the ribbon interface. Just select the document (one at a time) by clicking the check box before the document title and click on Send Document button. As soon as you click this button an email form will pop up which allows you to provide values for “To”, “Cc”, “Subject” and “Email body”. Just fill in the details and click send email. You document will be attached to this email and will be sent to the appropriate user. Also note that as a part of this installation, a send document configuration list will also get deployed on the root site which allows you to add users to whom you want to give rights to send document as an attachment. Do

Fab 40 Templates for SharePoint 2010

Now you can download Fab 40 templates for sharepoint 2010 which were not available before. The "Fantastic 40" templates were created for Wss 3.0.Microsoft has no plans to upgrade them for SPF 2010 however TechSolutions has migrated many of the templates and made them available  here .  Click here to download

An Approval Workflow for SharePoint 2010 with Visual Studio 2010 and Infopath 2010

Download Approval Workflow Source Code and Example. I have developed an Approval Workflow that can be deployed on SharePoint 2010 and can be associated to any list or library; it has been developed using Visual Studio 2010. This workflow creates approval tasks for the person who is responsible for the approval, you might think this similar to a usual SharePoint approval workflow, so here we are, to add the touch of spice to this solution, I want to throw some light on the task form, here I am using an InfoPath form when you go and edit this task. This opens up a hell lot of options to play with as InfoPath form is completely customizable. So you can modify the solution and the form as per your needs and requirements very easily. Open property window of State Machine Workflow & add the following values to the properties : Receiver Assembly  = Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c Receiver Class  = Micros

Opening a SharePoint 2010 dialog box for list form

If you want to open a window in a dialog from clicking a link then simply use the following JavaScript as the href property. javascript: var options = {url: '/Lists/MyList/NewForm.aspx?IsDlg=1&ContentTypeId=0x001989BCF16D8914CAF8862B0C6C89E091E' , title: 'Showing List' }; void(SP.UI.ModalDialog.showModalDialog(options)) As you can see this is simply taking the script you would usually call and adapting it to work in the href of a hyperlink anchor. It needs to be all on one line and return void when called. So why might you want to do this? Many reasons. Perhaps you have a list with multiple content types and you wish to open the new item form in a dialog AND change the title from the default “[List Title] – New Item” depending on which content type the item is being created from. The snippet above illustrates this. Or perhaps you wish to open a document library in a dialog. Or even an external site. Also you can use following script in your code : p

How to get current logged user information using JavaScript ?

This is post which is simple and not really needed. But when I started writing the code in ECMAScript I have faced problems in getting the logged in user information. So, my readers may feel good after see this post and really most the users are looking for this too. By this time, we have really understood all about ECMAScript Client Object Model and debugging. So, it's easy for us to know it well. Please find the code below to get the current user information. <asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server"> Now copy & paste this JavaScript code after above mentioned tag : <script type="text/ecmascript">         ExecuteOrDelayUntilScriptLoaded(getUserData, "sp.js");              // To Get Current User Name     var context = null;      var web = null;      var currentUser = null;      var currentUserId=''     function getUserData() {             context = new SP.Cli