Geeks With Blogs

News These postings are provided "AS IS" with no warranties, and confers no rights.
Locations of visitors to this page virtusa corp sharepoint shehan peruma
Shehan Peruma MOSS
Staring a workflow inside a list event receiver sends out a wrong link
Here’s the scenario: The user navigates to the NewForm.aspx page of a list and enters values into the necessary fields. As soon as the user click the OK button the browser should take the user to the EditForm.aspx page and load the previously entered item in edit mode and also start the approval workflow on the item. Solution: Create a event receiver for the list that hooks up to the ItemAdding event. There are quite a few blog posts out there that talk about this, so instead of typing down the same ......

Posted On Friday, October 1, 2010 6:04 PM

Pre-populate a textbox using jQuery
Here’s the scenario: I have a form which contains a textbox. This textbox should be populated with a query string value. Users should not be able to edit the value of the textbox while adding the item. Solution: The above can be achieved using a Content Editor Web Part (CEWP) and jQuery. Steps: 1. Append the NewForm.aspx url with the following: &PageView=Shared&To... 2. This will cause the ‘Add Web Part’ tool pane to show up. 3. Add a CEWP to the page. 4. Go the webparts properties ......

Posted On Thursday, February 25, 2010 7:23 PM

Rate pictures using a Survey and jQuery
Here’s the scenario: You have a handful of images which you need people to rate. Unlike SharePoint 2010, 2007 does not offer a rating control so you’ll either have to purchase a commercial product or install the open source alternative or even develop something custom. All these are possible if the server ‘belongs’ to your team/department. But (like me) if the SharePoint farm is owned by some other team and is utilized by the whole company for day-to-day activates then admins would frown on such ......

Posted On Saturday, July 17, 2010 6:57 AM

jQuery Slideshow
Here are steps on setting up a slideshow on your SharePoint site really fast using a Content Editor WebPart (CEWP), jQuery and a Picture Library. The jQuery for the slide show makes use of the Cycle plug-in located at There are plenty of demos on the site along with instructions on using the API. Here are the steps to implement the slideshow on a SharePoint site: Download the jQuery library and the Cycle plug-in and upload them to a document library Create a picture ......

Posted On Tuesday, March 2, 2010 1:02 AM

Deploying Web Parts to farms with more than 1 WFE
If you're developing webparts using VSeWSS and going to run the setup.bat that that VSeWSS creates, you might need to modify the deploy solution line before running it. The deploysolution instruction that VSeWSS adds contains the -local argument. This is all good if you're going to run it on an implementation with only 1 WFE, but for farms with 2 or more WFE's then you will need to change -local to -immediate. I also make it a habit to call the execadmsvcjobs command before and after adding and deploying. ......

Posted On Monday, December 1, 2008 9:50 PM

Get all replies to a discussion
A discussion list in unlike a normal list in that it consists of two content types - a Discussion content type that maps to the discussion topic and a Message that maps to all replies to the topic. If you examine the Discussion content type you’ll see that its inherited from the Folder content type. The reply contains a field called ‘ParentFolderId’ and as the name suggests it holds the ID of the discussion topic. So naturally if you were to do a query on the list for all items with the same ParentFolderId ......

Posted On Saturday, October 10, 2009 3:40 AM

Change the format of the 'Created By' field in a page layout
I was creating a custom page layout for a publishing site and one of the requirements was to display the 'Created By' field. Piece of cake, I thought, all I need to do was to all add the following: <SharePointWebControls:T... FieldName="Created_x0020_By" runat="server"/> However, this resulted in the field being rendered in the format- 'domain\username'. But on the 'View Properties' (DispForm.aspx) for the page the Created By field shown at the bottom of the page is in the correct format ......

Posted On Tuesday, December 23, 2008 4:13 AM

Search only items of a custom list
Had a requirement where search results should be limited to only items of a list. Naturally, I created a new Search Scope and set a rule of type Web Address to include the particular site holding the lists. did work, but not to my expectations. What was happening was that in addition to displaying the list items, the list views were also being displayed and so were other pages in the site....DOH! Doing a search on the net led me to this site. It was very informative, but it didn't provided ......

Posted On Wednesday, July 9, 2008 12:27 PM

Truncate the characters displayed in a blog post
This is how to reduce the number of characters displayed in a blog post on the default.aspx page of a blog site created from the OOTB SharePoint blog template. Open up the site in SharePoint Designer Open the default.aspx and switch to Code View Perform a Find & Replace for the following: Find- &lt;Field Name="Body"/&gt; Replace- &lt;Limit Len="99" IgnoreTags="TRUE" MoreText="..."&gt;&... Name=&quot;Body&quo... This would limit the ......

Posted On Tuesday, July 8, 2008 9:35 AM

Display Search Scopes in the Search DoropDown and Advanced Search page
Most of you all would probably be knowing this, but for the newbie out there who is just getting into MOSS's Enterprise Search features this would probably prove useful... Lets say that through the SSP Search Configurations page you've gone and created a couple of Scopes. But when you get back to your site collection you notice that none of the scopes appear in the search scope dropdown (normally located on the top right hand corner of the page), you only see the default scopes. What you need to ......

Posted On Thursday, February 28, 2008 10:15 AM

Copyright © shehan | Powered by: