Microsoft Technology, .Net, BizTalk, Sharepoint & etc.

Liedong(Ken) Zheng, Senior SharePoint Developer at SIMPLOT

Expiration Policy Timer job does not seem to run

Posted by ken zheng on December 15, 2009

http://ithinksharepoint.blogspot.com/2009/03/expiration-policy-timer-job-does-not.html

http://vspug.com/teameli/2008/10/13/record-center-information-management-policy-jobs-not-running/

Posted in Uncategorized | Leave a Comment »

Inserting line breaks into text using Rules in InfoPath

Posted by ken zheng on December 14, 2009

If you are using solution from http://blogs.msdn.com/infopath/archive/2005/03/04/385577.aspx. You need to make sure that your textbox is formatted to be able to display paragraph breaks. To do this double-click on the text box control, go to the Display tab, and check the checkbox labeled “Allow paragraph breaks”.

After this, your code should work, but if it still doesn’t try using “\n” instead of the System.Environment.Newline.

There is another way to do that.
http://www.infopathdev.com/forums/t/2013.aspx

Posted in Uncategorized | Tagged: , | Leave a Comment »

Validation on SharePoint List

Posted by ken zheng on December 9, 2009

You can customize the New/Edit Form in SharePoint Designer, or you can Javascript to show/hide field and validate on javascript PreSaveAction().

Below is the links to the solution

http://www.cleverworkarounds.com/2008/02/07/more-sharepoint-branding-customisation-using-javascript-part-1/

http://edinkapic.blogspot.com/2007/08/hide-field-from-newformaspx.html

http://edinkapic.blogspot.com/2007/10/add-javascript-date-validation-into.html

Posted in Sharepoint | Tagged: | Leave a Comment »

VS 2010 and .NET 4 Series From Scott Gu

Posted by ken zheng on December 9, 2009

Scott is doing a series of posts that talk about some of the cool things coming with the VS 2010 and .NET 4 release. You can access from this page.
http://weblogs.asp.net/scottgu/archive/2009/08/25/vs-2010-and-net-4-series.aspx

Posted in .Net, vs2010 | Tagged: , | Leave a Comment »

SharePoint Cascading Drop Down List

Posted by ken zheng on December 3, 2009

A very good solution to have. Check the following blog, describing how to configure the list correctly http://sharepointsircar.blogspot.com/2009/02/cascading-dropdownlist-custom-field.html.

Posted in Sharepoint | Tagged: | Leave a Comment »

Hide Advanced Search Link from SmallSearchInputBox

Posted by ken zheng on December 3, 2009

Search Box in the chrome works differently then any other place in the product. If you look at default.master(%Program Files%\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\GLOBAL) file you can find the following

So basically the search box is hosted by delegate control. Essentially the idea here is that WSS comes with a search box which supports certain features. When you install MSS or MOSS a newer Search box feature is installed with higher priority) and the delegate control know to pick this up. You can read more about the delegate controls here:

http://msdn2.microsoft.com/en-us/library/ms463169.aspx

Create a new feature that will put the search box with correct properties that you want: Follow the steps in

http://msdn2.microsoft.com/en-us/library/ms470880.aspx

In step 3 in the linked article instead of using what is specified in the article use this

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Control
        Id="SmallSearchInputBox"
        Sequence="21"

ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx" ControlAssembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">

      <Property Name="GoImageUrl">/_layouts/images/gosearch.gif</Property>

      <Property Name="GoImageUrlRTL">/_layouts/images/twg/goRTL.gif</Property>

      <Property Name="GoImageActiveUrl">/_layouts/images/gosearch.gif</Property>

      <Property Name="GoImageActiveUrlRTL">/_layouts/images/goRTL.gif</Property>

      <Property Name="SearchResultPageURL">/_layouts/osssearchresults.aspx</Property>

      <Property Name="UseSiteDefaults">true</Property>

      <Property Name="FrameType">None</Property>

      <Property Name="DropDownModeEX">ShowDD</Property>

      <Property Name="ShowAdvancedSearch">false</Property>

    </Control>
</Elements>

You do not need to do step 4 and 5 in the linked article. Note that I have changed the sequence number to 24 which will ensure that your control is what the delegate control render. It should be between 0-25 as the OOB search box has a sequence 25.

The property that I added is highlighted in green.

The value is ShowDD by default if nothing is set.

Posted in Sharepoint | Tagged: , | Leave a Comment »

Use “Velocity” Session

Posted by ken zheng on December 2, 2009

In .Net 4.0, there is a new way to store the cache. It is Velocity and current on CTP.

Velocity is a custom session provider that can replace the ASP.NET default session provider. See this blog for more details

Posted in .Net, vs2010 | Tagged: , , | Leave a Comment »

Unable to see default Silverlight control in Toolbox

Posted by ken zheng on December 2, 2009

If you can’t see default Silverlight control in Toolbox, run “devenv /setup” or “/reestsettings” in Run or “Visual Studio 2008 Command Prompt”

Posted in Silverlight, VS2008, vs2010 | Tagged: | Leave a Comment »

404 error When Import Excel data to SharePoint List

Posted by ken zheng on December 1, 2009

If you received this error, first try to install Excel 2007 Add-in: Synchronizing Tables with SharePoint Lists and repair your office 2007. Then restart the computer, it should work now

Posted in Sharepoint | Tagged: , | 2 Comments »