Friday, July 22, 2011

Resolved: using [Today] in formula of Calculated column.

Situation:
I have a check list is listing the domain name of customers who registered the domain with my services. I need to know the remaining of the validation date and send to customer an email. The expiration day is calculated from due date until today.

Problem:
I created a list with Due Date column with DateTime formated. Another column called remain days belongs to calculated with the formula like this: [Due Date] - [Today]. After click save, I got an error:


That means, I can not use the SP variables, but I can define a custom column with the formula had an existed SP variable such as [Today] and [Me]. And I have another solutions:

1) Create a new column named Today with type of DateTime
2) Modify the Remains column if you had created before. Change the formula to [Due Date] - [Today] with [Today] is a new column.
3) Delete [Today] column.

As a result, the Remains column is calculated from Due Date to today.

Sunday, July 17, 2011

How to connect to MICROSOFT##SSEE (Windows Internal Database) - SharePoint 2010

In a previous post, I introduced the way how to connect to internal sharepoint database. But the limited is just supported for SharePoint 2010.

In SharePoint 2010, something changed in the structure of Database such as the instance name is SERVER\SHAREPOINT instead of SERVER\SQLEXPRESS or SERVER\OFFICESERVERS,... or something like that.

And it's easy to understand that internal database also gives the way easiest to connect to database, just replace the instance name in connnection string to "SHAREPOINT": \\.\pipe\MSSQL$SHAREPOINT\sql\query

Sunday, July 3, 2011

Installing and Configuring Bamboo Discussion Board Plus for SharePoint

In forum view, there are two parts: Sticky topics and normal topics. Some important topics need to be shown at the top of the Discussion Board. By selecting the topics as sticky they will be displayed at the top under Sticky Topics. Other topics will be shown under the Topics section. All topics are sorted by the Last Posted time. In addition, each of the sticky topics is marked as sticky with a sticky icon () to the left of the title.


Read more at: http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2011/07/01/installing-and-configuring-bamboo-discussion-board-plus-for-sharepoint.aspx

Saturday, June 25, 2011

Why Microsoft recommended that should not use Microsoft.Web.CommandUI.dll in any SharePoint products??

Almost asp controls of SharePoint has imported the namespace "Microsoft.web.commandui.dll" to manage the Ribbon. However, this dll wasn't recommended to use if you need to customize your Ribbon. To use the type or namespace of Ribbon, we should use "Microsoft.SharePoint.WebControls". Or course, in Microsoft.SharePoint.WebControls namespace also has implemented SPRibbon, but it's not enough.

Deassembly the WebControls namespace, SPRibbon only has some types, especially it does not have TrimById method, just Microsoft.Web.CommandUI.dll has.

I don't understand why Microsoft recommended that should not use this dll!??

Do not use types or members of the Microsoft.Web.CommandUI namespace for development within a SharePoint environment, but instead use SPRibbon and related types in theMicrosoft.SharePoint.WebControls namespace. For information about customizing the ribbon in SharePoint Foundation see Server Ribbon in SharePoint Foundation.

Anybody helps me?

Friday, June 24, 2011

Passed the examination 70-573: Microsoft SharePoint 2010, Application Development

I've decided to attend the examination 70-573 because I am working as Developer of SharePoint 2010.
It's not difficult for me because I had attended the Online Course:

and now it helps me a lot in my work, i feel better after finished learning the course and passed the examination. I will return to my blog in short day and continue sharing my knowledge about SharePoint 2007/2010.

Thanks for my co-worker helping.

Tuesday, June 21, 2011

Passed the examination 70-576: Designing and Developing Microsoft SharePoint 2010 Applications

I'm very happy to notice that I just passed the examination of 70-576.

A lot of skills need to be improved if you learn onlin at:

http://www.microsoft.com/learning/en/us/exam.aspx?id=70-576

Of course, that's very good document and orient the right way to pass the examination. After finish the online course you will learn the strongly knowledge to work with SharePoint 2010 with Design and Develop software based on SharePoint 2010.

Thanks again.

Thursday, May 12, 2011

What about the issue of Calendar in SharePoint 2007 show wrong datetime.

I decided to post this issue because I did not find out any wrong in my system, and if it is a WAD or Bug, please confirm this topic is correct and I will send this link to my customer.

Problem:

Install SharePoint 2007 with the default settings for everything. Create a celendar list and then create a column named "My Date Time" or something you want with DateTime type and show both Date and Time.

Create an item in Calendar with All Day Event checked, type a date into "My Date Time"

After save, everything is fine. Please see the picture in view form.

Title, AlldayEvent, My Test Datetime show correctly, data kept. But what is happening when I edit this item?


"My Test Datetime" was wrong, the date is minus 1 day and if I save this item, the data will store this date.

There is very strange that it will not change for the next editing. And this issue does not happen in SharePoint 2010

Tuesday, May 10, 2011

How to format datetime in SharePoint XSLT

In SharePoint (both of 2007 and 2010), Microsoft has implemented  XSLT 1.0 into CQWP (Content Query WebPart) and parse xsl file.

You can find out these file at 14\TEMPLATE\LAYOUTS\XSL, you will see some xsl files such as main.xsl, thread.xsl,... For now, you change reference version of xslt for these files, you will get an error because CQWP only understand the structure of XSLT 1.0. So, there are a lot of limitation to work on DateTime, String,...and other functionings of XSLT 2.0.

However, in SharePoint you can use an alias to get somes already formatted by using ddwrt namespance. Detail for more

It's very easy to use:

<xsl:value-of select="ddwrt:FormatDateTime('2010-may-25', 'G', 1033)"/>


First argument: Date original value
Second argument: Formatted expression, this argument has supported flag/string such as "d" (or 1) for date only as result as "M/d/yyyy"...
Third argument: regional setting. But no support for User Regional Setting


Thanks/

Wednesday, February 23, 2011

how to indicate the type of list definition?

I am working on list definition with the type id is 10001, my list is based on Calendar list.

But how can i indicate my list def is Events List or not?

Thanks for you helping!

Friday, February 18, 2011

Support discussion board list definition in VS2010 template

Visual Studio 2010 had supported List Definition  template to create the project automatically with fully the schema and define the structure of list. Unfonately, it has not supported for Dicussion Board list.

But you can download another template to upgrade your existed template and can use dicussion board list.

Download here

To use this package, please following this instruction:
  1.  Extract this pakage then copy all folders & files into: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache\CSharp\SharePoint\SharePoint14\1033\SharePoint14ListDefinition.zip
  2.  Copy this compressed file into: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\SharePoint\SharePoint14\1033
  3.  Please overwrite all files and folders as if request.
Good luck!