Skip to main content

Posts

Showing posts with the label customization

Maintaining Control Focus on Postback in ASP .NET

I have recently got an issue with massive ASP .NET Web Form which is needed for a lot of details to be entered and takes several screens to display. When you edited something in the middle of the form and initiate a postback - the form was displayed from the top. In my case Web Form was a part of custom Web Control which is rendered within the SmartPart for SharePoint . I found the following article which helped me - How to implement the smart navigation features in ASP.NET 2.0 . I put the following instruction in the OnInit event handler for my Web Control: this.Page.MaintainScrollPositionOnPostBack = true; It helped! Now when I do something on postback my Web Control scrolls back to the place I edited last. Simple but powerful.

Custom Search Results Page

Scenario We have to display customized search results in SharePoint. We also need custom look and feel of our search results page. Solution Create a custom Search Result Page and make it work as we need. 1. Create a Web Part Page from the Create menu: 2. Edit the created page and press Add Web Part button: 3. Select some Web parts related to Search - the most required are Search Box and Search Core Results - and click Add button: 4. Web parts will appear on the page: 5. Edit Search Box Web part properties. Set up Target search result page URL to the server relative URL of current page. In my case it is "/Pages/customsearchresults.aspx": 6. Setup Scopes Dropdown - Dropdown mode - to "Show, and default to 's' URL parameter" and press OK button: Pretty easy right? :) If you have any questions in regard to implementing and customizing SharePoint Search to get more efficiency in business activities for your company or you need ass...

SharePoint 2007 Integration With Dynamics CRM - Solution - Part 1

The Scenario An organization has relationships with third-parties. Accounts, customers, members, suppliers etc. The organization has a SharePoint Web site and Dynamics CRM where the information about third-parties is processed. As the current business process dictates, large number of external clients - agents in this sample - needs to contact organization via email, fax, regular mail or in person in order to submit important business information - applications in this scenario. We will create a public SharePoint Web site where agents can submit applications and then those applications will be copied automatically to Dynamics CRM and when their processing in CRM is finished some feedback will be published back to the SharePoint Web site and agents will be able to see the status of the application in CRM online on the SharePoint Web site. We defined the solution design as below: In order to get the solution we defined the following tasks: 1. Develop a custom SharePoint Workflow which w...

Mighty SharePoint Workflows - part 3 - workflow history and audit solutions

I came across the limitation of the workflow history in SharePoint the other day. After 60 days the history is cleaned up. Technically it's the right way of doing things in SharePoint, because workflow history is a list and if we have more than 2000 records in the list we have performance issues. There are some blog posts about that issue. The main one: Huge MOSS Workflow Issue... What is Microsoft Thinking!!!! The other linked to the issue: SPWorkflowAssociation.AutoCleanupDays I worked with several clients on custom workflows for SharePoint and we created the separate audit database where all the SharePoint workflow activity information and list/library item information is stored. For guys who have already created workflows in SharePoint or use standard SharePoint workflows - like Approval etc. - and they are not sure what to do the solution is to develop or purchase a tool to migrate their workflow history to separate database on a regular basis. I can help with that...

Connect SharePoint Web Parts Programmatically

The task Send data from one Web part to another. Scenario could be like one Web part contain the list of items - say video, images or clothes catalog - and the other Web part displays detailed view of the catalog item. Solution 1. Create Web part which will send data - data producer. 1.1. When the Web part class is created we need to inherit that class from ICellProvider. The class definition will look like the following: public class DataProviderWebPart : Microsoft.SharePoint.WebPartPages.WebPart, ICellProvider { ... } 1.2. Define the following properties: public event CellProviderInitEventHandler CellProviderInit; public event CellReadyEventHandler CellReady; private int _nCellConnectedCount = 0; private string _sCellInput; private string _sCellName; private string _sCellDisplayName; 1.3. Override the following methods: EnsureInterfaces, CanRunAt, PartCommunicationConnect, PartCommunicationInit, PartCommunicationMain, CreateChildControls. public override void EnsureInterfaces() ...

Comprehensive BDC Overview

Recently I have come across a set of article about BDC. I haven't seen anything more informative yet. Here it is: Part 1, BDC Purpose and technical architecture Part 2, Application Definition File (ADF) and its Development Part 3, Developing an ADF to Connect to Web Services Part 4, Consuming Business Data through Web Parts and SharePoint Lists Part 5, Implementing Enterprise Search with Business Data Part 6, Integrating User Profiles with Business Data Part 7, BDC Object Model

Mighty SharePoint Workflows - part 1 - workflow association, workflow instance

The task Display SharePoint lists or libraries with active workflow associations. Display item that have running or completed workflow instances and workflow status for this item. In our scenario we have a document library with associated Disposition Approval workflow started on the document: Solution 1. Get Workflow Association data for the certain list or library. SPList list = ...; // Initialize your list instance here if (list.WorkflowAssociations.Count != 0) { foreach (SPWorkflowAssociation workflowAssociation in list.WorkflowAssociations) { Guid gId = workflowAssociation.Id; string sName = workflowAssociation.Name; ... // output the values you have got // in our scenario we add them to Hashtable object hashtable.Add(gId, sName); } } 2. Get workflow instance data for the certain list item or document. We can access workflow instance data from the Workflows property of SPListItem object: foreach (SPListItem item in list.Items) {...

Working with SharePoint Workflows

SharePoint 2007 out-of-the-box provides ability to associate workflows - simple pre-installed like Approval, Disposition Approval, Three-state etc. and custom workflows - with SharePoint lists or libraries. What is missing - at least in this version of SharePoint - is the ability to monitor running and/or completed workflows across the whole SharePoint Web site. As a step forward I have developed a Web part which allows people to monitor workflows across the Web site and sub-sites. I have also developed numerous custom workflows for SharePoint using Visual Studio. This post is the first in series of articles about working with SharePoint workflows programmatically. In the coming posts I will show you how to manage workflows programmatically in SharePoint. Stay tuned. :) Update: Below are the links to articles. Mighty SharePoint Workflows - part 1 - workflow association, workflow instance Mighty SharePoint Workflows - part 2 - workflow statistics, workflow tasks, workflow history Mighty...

Display Subscribe to RSS feed link on SharePoint Web site

The task Expose any RSS feed link on the SharePoint Web site so visitors can subscribe to that RSS feed. Create or use existing image library to store the RSS image for the link. In this scenario we will create a Picture Library in SharePoint and upload our image there. Solution 1. Create Picture Library. 1.1. On your SharePoint Web site browse the View All Content link: 1.2. Then click Create button: 1.3. Then choose Picture Library as a type: 1.4. Provide library name and click OK: 1.5. Select Upload command to put RSS image into the Picture Library: 1.6. Browse for the image file and click OK: 1.7. Provide relevant information about the image and click OK: 2. Get the link to RSS feed. In our scenario we will use RSS feed for SharePoint calendar. 2.1. Browse to the list: 2.2. Run View RSS Feed command from the list menu: 2.3. Copy the RSS feed URL from the browser address bar: 3. Edit Web site home page in order to display RSS feed link. We will use Content Editor Web Part in this sc...