How to compare Today date for Birthday field in SharePoint List?

By Yeoh Eik Den on September 20th, 2012
  • First, create a new column in your list with the column name of “Today”.
    Click “OK”.  (It doesn’t matter what type of column or data it is, this is
    just a place holder and will be removed later). MK Note: Create column called Today… I also created a column called DOB (date field) where I will enter the birth date.
  • Next, create a column with the data where you would like to use “Today” as a
    reference to today’s date.  The column type should be “Calculated”.  In the
    formula field, create your formula using “Today” as if it held the column date/time. SharePoint will calculate the formula based on the assumption that you will be using “Today” as a reference to the new column you just created. MK Note: I created a column called MonthCheck with the formula shown below: =IF(MONTH([Today])=MONTH([DOB]),”Birthday”,”NotBirthday”)
  • Next, edit the new column named “Today” that you created in the first step.   On the very bottom of the page, click “Delete”, to delete the column.  In your formula, SharePoint will keep the reference to “Today” but it will change from referencing your column, to a reference to the current date.
  • MK Note: Now you can create your new view in the list to display “This Month’s Birthdays“.  Just apply a filter to Show only when the following is true: MonthCheck is equal to Birthday I’ve also created a BirthDay Column (Capitalized the “D“ to note the difference) as well that is a calculated column: =DATE(YEAR(Today),MONTH(DOB),DAY(DOB)) You can then create a view to display Today’s Birthdays by filtering to Show only when the following is true: BirthDay is equal to [Today]

How to retrieve SharePoint List by SharePoint Webservices?

By Yeoh Eik Den on September 19th, 2012

 

Above is using an announcement list as example for how to retrieve items using Getlistitems with CAML query?

If you would like to know more details, please check at >>here<<

 

 

Missing Term Store Management link under Site Settings

By Yeoh Eik Den on August 27th, 2012

If you not able to found term store management link under site settings. You can run stsadm command under the SharePoint server which example provide below:-

STSADM -o activatefeature -id “73EF14B1-13A9-416b-A9B5-ECECA2B0604C” -url <Your Site URL Here> –force

Of course, you have alternative to enable the feature. You can use powershell and run the command below:-

Enable-SPFeature -identity “73EF14B1-13A9-416b-A9B5-ECECA2B0604C” -url <Your Site URL Here>

After run the command, you manage to see the link appear under the site settings.

Using jQuery and SPServices to rotate announcement news in SharePoint

By Yeoh Eik Den on July 29th, 2012

Before you try to build news ticker in SharePoint, you need to download jQuery 1.7.2 version and SPServices 0.7.1a for plug into SharePoint Project.

This project will generate a custom SharePoint list and publish the information into SharePoint page by using SharePoint Web Part.

See >>Demo<<

Script below are retrieve SharePoint custom list and publish information, the information will be rotate in the page and able for user to click on the link to display an information via SharePoint Modal Dialog.

Paste code below to your page or you can place it at content editor. So that data can be display into the line.

 

If you would like to try it up, you can refer and download below resource:-

>>Download<<

This project is created by using Sandboxed Solution.

You can refer more sample from >>Here<<

SharePoint 2013 Technical Preview

By Kelvin Lee on July 17th, 2012

Lots of new information by Microsoft about the next version of SharePoint. Check it out.

Credit to: http://tremblayse.wordpress.com/2012/07/16/sharepoint-2013-technical-preview-available-5/

System.NullReferenceException in Silverlight designer

By Tan Chee Keong on July 12th, 2012

I have this issue right after i’ve created a silverlight project. The silverlight designer is showing error like below:

An Unhandled Exception has occured

Click here to reload the designer

Details:

System.NullReferenceException Object reference not set to an instance  of an object.    at  Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.d__8.MoveNext()  at  MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()   at  MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier  identifier)    at  MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope  parentScope, IParseContext context)    at  MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent,  PrefixScope parentScope, IParseContext context, IMarkupSourceProvider  provider)    at  MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean  convertToXamlWithErrors)    at  MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem()  at  Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem()  at  Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState()  at MS.Internal.Host.PersistenceSubsystem.Load()    at  MS.Internal.Host.Designer.Load()    at  MS.Internal.Designer.VSDesigner.Load()    at  MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()    at  MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView  view)    at  MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory  factory, IsolatedView view)    at  MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory  factory, IsolatedView view)    at  MS.Internal.Host.Isolation.IsolatedDesigner.Load()    at  MS.Internal.Designer.DesignerPane.LoadDesignerView()

Well, even with this error, i can still use XAML to add controls, panel etc, and i am still able to build the solution and view output when i run it. But this is quite unconvenient as i could not see the design instantly via designer view, and also could not drag & drop controls into the designer window.

After some research, i found that the issue is because i had Silverlight SDK 3 and 4, together with Silverlight version 5.

So i uninstalled Silverlight 5 (via add remove program), and reinstalled Silverlight version 4 (using this link: http://go.microsoft.com/fwlink/?LinkId=146060) and ….

Phew! i can now view the Silverlight designer without error

JQuery, SharePoint Client OM Intellisense enable in Visual Studio 2008/2010

By Yeoh Eik Den on July 2nd, 2012

Recently, I am using quite often to write jQuery, Javascript and SharePoint Client OM for my project. I found that default visual studio does not provide enough intellisense for jQuery, and Client OM. Therefore, I do some research and found out how to enable it.

To enable it, developer required to do some manual steps. This article is to help developer how to enable intellisense in visual studio 2008/2010.

Enable jQuery Intellisense

Before proceed to enable jQuery intellisense, visual studio 2008/2010 needs a special jquery library which is ‘vsdoc’ file provides the jQuery documentation. This can be download from official jQuery site, >>Click here<<.

Intellisense in .js file

In javascript file, use the reference tag add in the header and pointing to vsdoc file. Refer to below code:-

Code Snippet

 

Intellisene in aspx/ascx

If in aspx or ascx page, add below references for intellisense at the header of aspx/ascs

Code Snippet

 

Enable Client OM Intellisense

For enable client OM intellisense, same method apply from the steps above, just that pointing to different library.

in .js file

Code Snippet

 

in aspx/ascx file

Code Snippet

 

Enjoy coding!!!

 

You need to install the latest Silverlight developer before opening silverlight project

By Tan Chee Keong on June 30th, 2012

I have this error while trying to create my first Silverlight project. I’m using Windows 7 and Visual Studio 2010 Ultimate (64 bit).

There is a popup from visual studio to ask me to download the runtime at http://go.microsoft.com/fwlink/?LinkId=146060

But it is not working. There is another error saying that this version is older that the one i have.

After some searching, i found this latest installer (link below) that installed the latest Silverlight 5 for developer (64 bit), and it solved my problem. I can now create/open Silverlight projects ~

http://go.microsoft.com/fwlink/?LinkID=229324

 

How to filter SharePoint Custom List by using QueryString?

By Yeoh Eik Den on June 21st, 2012

Add QueryString at end of the URL. Such like

 

 

This method is simple and easy to do filtering for SharePoint Custom list. Especially when you have a lookup field from custom list via redirect from one list to another list.

Debugging mode does not run in SharePoint

By Yeoh Eik Den on October 4th, 2011

What you need to do is follow the steps below to try again the debugging mode

  1. Start –> Run –> Enter %systemroot%assemblygac –> [ENTER].
  2. From there, go up one folder, then into GAC_MSIL folder.
  3. Paste the pdb file with the DLL that you required to debug. Then run again to attach the process for debugging.