Sharepoint Insight by Namwar Rizvi

May 25, 2009

User Profile Import is not updating changes in Manager property of Active Directory

Filed under: Uncategorized — namwar @ 10:10 pm

Some of you might have experienced an issue that if you update manager  property of any user in Active Directory, it does not get reflected in SharePoint Profile Import. This issue has been identified as a bug in Profile Import and can be fixed by Installing Service Pack 1 of MOSS/WSS.

The reason behind this bug is that SharePoint Profile Import does not detect change in Manager property due to some weired reasons.

If you can not install service Pack 1 then you can fix it by implementing a workaround as follows:

  1. Open SharePoint Central Administration
  2. Navigate to your SharedService Provider e.g. SharedServices1
  3. Under User Profiles and MySites click User Profiles and Properties
  4. Under User Profile Properties , click View profile properties
  5. Click New Property
  6. Add ModifyTimeStamp property and map it to ModifyTimeStamp property of Active Directory.
  7. Click OK
  8. Perform Full Import of user profile
  9. Perform Full Crawl and you are done!

April 7, 2009

Microsoft SharePoint Designer is now Free !

Filed under: Customization, Tools — namwar @ 9:49 pm
Tags: , , , ,

SharePoint Designer Team at Microsoft has announced at its blog here that Anyone can use SharePoint Designer as a free tool. This is really a step in right direction and will help SharePoint community to build better user experiences. 

You can download the SharePoint Designer from here

April 1, 2009

How to Search on Last Modified By field in SharePoint Advanced Search

Filed under: Bugs, Search, Solutions — namwar @ 9:37 pm
Tags: , , , ,

If you are wondering why you are unable to find any search result for Last Modified By filed in Advanced Search of SharePoint then don’t worry, you are not alone. This is one of the bug which still exist in SharePoint 2007 Server Search engine. I have found a solution posted by Pritam Dhake ina  SharePoint forum. I have used this solution and it works like a charm.

Here are the steps to manually hook the Last Modified By field to the creawled field.

  1. Open Central administration -> Shared Services -> SharedServices (X being the number of the shared services provider for the site you are creating a mapping)  – > search settings -> metadata property mappings 
  2. Click “Modifiedby” to edit the properties 
  3. Make sure  “Include values from all crawled properties mapped” is selected
  4. Click “add mapping” and select the “Office” category from the dropdown list. 
  5. look for a property named “OFFICE:8” , click “OK
  6. Click “add mapping” and select the “ows_Last_x0020_Modified(text)” from the ALL categories dropdown list, Click “OK
  7. Make sure the box is checked “Allow this property to be used in scopes”, click “OK
  8. Click on “Crawled Properties” link on the left side of the Shared Services Administration page. 
  9. Click On the “Office” Category.
  10. The mapped property you just created should be listed in the “Mapped To” column of the Office:8(Text) category.
  11. Click on the Office:8(Text) category to view the properties.
  12. In the “name and information” section, you should see the “property Set ID:” value is  ‘F29F85E0-4FF9-1068-AB91-08002B27B3D9‘ …This is very important!!!
  13. In the “Mappings to managed properties” section the managed property you edited in steps 2 – 7 should be listed. 
  14. The box to “Include values for this property in the search index” should be checked.
  15. Click “OK” to exit this page.
  16. Open “Shared Services administration” -> “ShareservicesX” -> “Search Settings” -> “Content Sources and crawl schedules” 
  17. Click on “Local Office SharePoint Server sites” to expand the dropdown list and select “Start full crawl” 
  18. When the crawl has completed, navigate to the site collection -> click on the search tab. 
  19. Select “Advanced Search” 
  20. In the properties dropdown list select “Last Modified By
  21. Select contains
  22. Enter a name that you know has added / edited a document
  23. Click the magnifier to execute the search
  24. Get back results.

March 27, 2009

Solution for “Virtual PC has detected an invalid or missing Product ID” error

Filed under: Configuration, Solutions — namwar @ 11:10 pm
Tags: , , ,

If you are like me and use Virtual PC for developing SharePoint solutions, then you may have encountered the error “Virtual PC has detected an invalid or missing Product ID”.  It happens because Virtual PC try to find its product ID in registry, (Yes! I know Virtual PC never asked you to enter the Product ID during installion) and if it does not find it there then it displays this error.

virtual-pc-product-id-error

Here is the quick fix for this error:

 

  1. Open System Properties window by clicking System in Windows Control Panel
  2. You will get the screen similar to the following
  3. system-properties1

  4. Copy the 20 digit long number displayed under Registered to: 
  5. Goto Start->Run
  6. Type regedit, It will launch the registry editor
  7. Navigate to the following registry node My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Micorosoft\Virtual PC\5.0\Registration
  8. Edit the value of PID, by double clicking it
  9. Paste the value of Windows Product ID, you have copied earlier. Following is an example screen shot of registry
  10. virtual-pc-registry

  11. Now you can run the Virtual PC normally :)

March 25, 2009

Ten Themes for SharePoint in VSeWSS Projects

Filed under: Guidance, Templates — namwar @ 9:30 am
Tags: , , , ,

Ten new SharePoint themes have been released by Microsoft to help SharePoint designers to make new sites more efficientlty. You will find them as individual  Visual Studio 2008 projects which when deployed to SharePoint offer fresh new designed themes you can use in your projects. 

Themes can be downloaded from here

Following is a preview image of these themes (from Sharepoint.microsoft.com)

March 24, 2009

Visual Studio 2008 extensions for Windows SharePoint Services 3.0, v1.3 – Mar 2009 CTP

A goow news for SharePoint community :) Microsoft has releasesd the Mar 2009 CTP of Windows SharePoint Services 3.0 v1.3. This CTP contains excellent set of functionalities and saves your precious time. You can download the extensions from here

Following is the overview as released by Microsoft

This is the SharePoint developer tools for Visual Studio 2008. These tools are suitable for use with Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007. It includes project and item templates for common SharePoint artifacts, it includes build, packaging and deployment for SharePoint solutions and it includes the SharePoint Solution Generator which creates a new Visual Studio 2008 project from a SharePoint site.

The tools provide item templates for List Definition, List Definition from Content Type, Content Type, Field Control, Web Part, Module, Root File, Template, Event Receiver, and List Instance. It provides project templates for Team Site Definition, Blank Site Definition, List Definition, Web Part and Empty. It works with Visual Basic .NET and C# languages and a comprehensive user guide is included. It does not include the SharePoint Workflow templates as they are built in with Visual Studio 2008.

New features in version 1.3 include:

  • Can be installed on x64 Server OS machines running SharePoint x64. Previously only x86 Server OS could be used
  • Separate build commands for package, deploy and retract are added as Visual Studio menu items
  • WSP View improvements for consistency of deleting feature elements, merging features and adding event receivers to features
  • Command line build, package and retract commands are included enabling continuous integration and build servers. Previously command line build of SharePoint projects was very difficult
  • Refactoring support for renaming of Web Parts. Previously renaming a web part required changes in several files in the project
  • Solution Generator can now generate solutions from publishing sites. Previously only regular sites could be generated
  • Allowing partial trust BIN deployments of web parts
  • New project item template for SharePoint RootFiles items
  • Deployment will now optionally remove conflicting existing features on the development server prior to redeployment. Previously any feature name conflicts would result in an error
  • Ancillary assemblies such as for business logic can now be added to the SharePoint Solution WSP
  • Hidden features related to Site Definition projects are now shown in WSP View. They are no longer hidden
  • For advanced users a fast deploy is included to update only the compiled assembly on the SharePoint development installation
  • Deployment step logging is included
  • The List Definition from Content Type template now allows for the creation of a List Definition Event Receiver
  • The User Guide is now installed with the extensions instead of being a separate download

March 15, 2009

Display filtered files list without creating new views

Filed under: Management — namwar @ 9:26 pm
Tags: ,

You may have noticed already thatwhen you try to save file in any document library from Microsoft office applications, you get a nice view of files list inside file dialog box like below:

flie-dialog2

This view is just an html generated by the owssvr.dll file located in _vti_bin folder of your virtual server. You can use this to display list of files on your web page by using Page Viewer Web Part. Say, for example, you want to display all the .doc files of Shared Documents documents library then URL will be

http://mossdev:500/Yahoo/_vti_bin/owssvr.dll?location=Shared%20Documents&dialogview=FileSave&FileDialogFilterValue=*.doc;

You will get the following display in your Page Viewer Web Part

file-properties

Following are the details of query parameters:

  1. location=document library name
  2. dialogview=FileSave (there may be other options but for the list, we will use this options)
  3. FileDialogFilterValue =specifies what type of files will be displayed in the list, feel free to specify any file filter as you normally specify in windows file dialgogue boxes. For example, for all xls files starting with a can be listed by specifying the filter value as a*.xls.



March 1, 2009

Display “! Updated Today” indicator just like “! New” icon in Document Library

Filed under: Uncategorized — namwar @ 10:43 pm

One of my cliens wanted to display “! Updated Today” icon (just like New icon) against all of those documents which are updated today so that their users can easily identify these documents. Since the customer just wanted this behaviour in some of the document libraries instead of all of them therefore, I opted to update the “AllItems.aspx” in Sharepoint Designer. By using a few lines of xsl code, I was able to achieve it. Following is the step-by-step procedure:

  1. Open the target page (normally it will be “AllItems.aspx”) in Sharepoint Designer
  2. Right click the ListViewWebPart and select Convert to XSLT Data View”
  3. context-menu

  4. Switch to Code view and search for 
    <xsl:if test="ddwrt:IfNew(string(@Created))"><IMG SRC="/_layouts/1033/images/new.gif" alt="New" /></xsl:if> 
  5. press Enter after the closing tag of above line i.e.  </xsl:if>
  6. Insert the following lines 
  7. <xsl:if test=”ddwrt:FormatDate(string(@Modified), number($Language), 1)=ddwrt:FormatDate(ddwrt:TodayIso(), number($Language), 1)”>

    <xsl:if test="ddwrt:FormatDate(string(@Modified), number($Language), 1)!=ddwrt:FormatDate(string(@Created), number($Language), 1)">

    <span style="background-color:maroon;color:white"> ! Updated Today</span>

    </xsl:if>

    </xsl:if>

     

  8. Save the file and refresh your browser.Bingo!  you will start getting “! Updated Today” indicator against all those files which are updated today similar to following:
  9. document-library1

February 26, 2009

Launch Office Application from SharePoint Portal Page

Business Problem:

    One of my client wanted to have links on main portal to launch Microsoft Office key applications i.e Word, Excel, Power Point and Outlook directly by clicking on a link at portal page.

Solution:

I searched the net and find a nice solution here It is a small piece of JavaScript code which you can put in CEWP and use it on your portal page. I added some formatting and relevant icons against the office applications and wraps it up in a webpart dwp file. After importing this web part on your page, you will get something like this:

launchofficeapplication1

You can download the dwp file from here

February 19, 2009

Add Custom context menu by Javascript in SharePoint

Filed under: Uncategorized — namwar @ 10:09 pm
Tags: ,

If you want to add a custom menu item in Document Library’s item context menu just by Javascript without going into the details of  adding any new feature or writing your own assembly then here is a quick trick:

  1. Add a new Content Editor Web Part on your target page
  2. Open the tool pane of the web part
  3. Click Source Editor and add following Javascript code in it
    <script language="javascript">
    function Custom_AddDocLibMenuItems(m, ctx)
    {
      var strDisplayText = "Say Hello World!";
      var strAction = "alert('Hello World')";
      var strImagePath = "";
    
      // Add our new menu item
      CAMOpt(m, strDisplayText, strAction, strImagePath);
    
      // add a separator to the menu
      CAMSep(m);
    
      // false means that the standard menu items should also be rendered
      return false;
    }
    </script>
    
  4. Click Save
  5. Click OK in toolpane to close it
  6. Now open the context menu of an item of the document library and you will see your new menu item in it similar to following

javascript-custom-menu

Please note that this menu item will only be visible on your target not on every page of your document libraries.

« Previous PageNext Page »

Blog at WordPress.com.