Posts

Create a Search Scope for a Sharepoint 2010 List or Library

Image
Update: I’ve just recorded a screencast tutorial on creating a search scope: click here Go to Site Actions > Site Settings (make sure you’re in the root site), and click “Search scopes”. Click “New Scope” to create a new scope to load in a sub-page of the site. Nothing really needs to be set on this screen except the title. If you want this to be a default scope that shows in the normal scope dropdown, make sure and select the “Search Dropdown” box. Otherwise, everything can be set in your custom page. In the next screen you’ll see your newly created scope under “Unused Scopes”. There are no rules attached to this scope yet, so let’s go create some. Click “Add rules”. If you want this search scope to query a specific list (for instance, I wanted it to troll through the “newlist” list), enter the address of the list in the “folder” textbox. Also, if you check “require” it will designate that only this list will be searched. I’m not exactly sure how often the scopes update, but it s...

SharePoint 2007 Page Life Cycle

User request the SharePoint Page using http ASP.NET calls the WSS File provider WSS file provider returns the page from File or Database Page is parsed by SafeMode parsor if required Returned page is complied by ASP.NET Compiler WSS File provider collects the page layout class and complies it ASP.NET engine adds SharePoint Context Data to the site meta data and retreives the associated master page. Master page got compiled and responded back to the user.

ASP.NET Page Life Cycle

Image
ASP.NET Page Life Cycle  When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include initialization, instantiating controls, restoring and maintaining state, running event handler code, and rendering. It is important for you to understand the page life cycle. General Page Life-cycle Stages (Courtsy MSDN, CP, UsualDosage, Several Blogs...) In general terms, the page goes through the stages outlined in the following table. In addition to the page life-cycle stages, there are application stages that occur before and after a request but are not specific to a page. Putting together an acronym for the page life cycle is easy enough. Since the Page Request technically isn't a part of the life cycle (it only indicates whether we actually will start the cycle or load a cached page) we won't include it in the acronym. S � Start I � Initialize L � Load V � Validate E � Event Handling R � Render That gives us ...

Copying/Moving SharePoint 2010 Designer Workflows

Image
https://blogs.msdn.microsoft.com/momalek/2012/04/22/solved-moving-sharepoint-2010-designer-workflows-between-sites/ In man occasions you would be faced by the need to move workflows you developed using SharePoint designer from one site to another. This might be the case if for example you developed and tested the workflow on a testing environment and now wants to move to the production environment without the need to re-develop the workflow. The steps to perform this is rather simple: Export the workflow to Visio. Edit the VWI archive and delete the configuration file. Import the workflow back to your destination site. So open the SharePoint designer and open the source site. click on the workflows link on the left and then the workflow you want to move. Click on the ribbon on export to Visio button. Now rename the file exported (VWI file) to be a ZIP file and open it with Windows Explorer. You will find a file named “workflow.xoml.wfconfig.xml” Just delete this fil...

Emulate User Roles in InfoPath Forms Services to Automatically Switch Views

Image
Many of my SharePoint consulting clients and students express the need to have different users see different views of an InfoPath form. In the InfoPath client, this is easy to handle using the User Roles functionality which has been well-documented elsewhere. Unfortunately, User Roles are not supported by InfoPath Forms Services for your browser-enabled forms. Here is a work-around that I have been using for quite some time that has worked well for me and my clients and students. In this post we'll create a simple InfoPath form with two views: one view for most users and another view for administrators only. When the form loads, it will check to see if the current logged in user is an Administrator for that form and if he is it will display the Admin View to the user. If the user is not an administrator for the form, it will display the User View . Create a Custom List to Store Users and Permission Levels Although SharePoint exposes a number of web services that reveal secur...

Best Practices: Disposable SharePoint Objects

Image
The objects in the Windows SharePoint Services 3.0 object model serve as an interface for working with Windows SharePoint Services data. Frequently, developers call into the object model to read data from or write new data to the Windows SharePoint Services store. The Windows SharePoint Services object model contains objects that implement the IDisposable interface. You must take precautions when using these objects to avoid their long-term retention in memory in the Microsoft .NET Framework. Specifically, you should explicitly dispose of those SharePoint objects that implement IDisposable when you are finished using them. In scenarios in which you use SharePoint objects extensively—for example, in SharePoint sites that use custom Web Parts—you can cause the following unusual behaviors by not disposing of SharePoint objects when you are finished with them. Frequent recycles of the Windows SharePoint Services application pool, especially during peak usage Applic...