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!



Monday, February 14, 2011

"Access denied. Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

Contribute account can access and some actions on the page. I created a new page with inheritance from the default.master of SharePoint 2010.

I tested on SharePoint 2007 and as a result it works smoothly. But in SharePoint 2010, I got an error:

"Access denied. Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

The trace log:



It took me some hours to find out the problem, event thought I run the debugging line by line but it thows the exception before reach the CreateChildControl method. I guest it happens from ASPX or MasterPage.

Here is the problem:


 Some resources of this MasterPage can not be accessed by Contributor account, so just remove them out. Hope this help you fix your issue.

Sunday, February 13, 2011

"Access denied" when using contributor account to access to content-type

When I was using the contributor account to check the content-type folder is "message" or "Dicussion", I got an error: "Access denied!"

My code:

if (ctype.ResourceFolder.Name == "Message")
{
     //do something
}

But nothing happened with owner account.

Yes, because contributor account can not access to ResourceFolder properties of content-type. ResourceFolder was inherited from SPFolder and execute the method FolderEnsure. You know to give the access to folder ensure the account must be set the properties currentWeb.AllowUnsafeUpdates = true; and the default for member account does not have permission to run that update.

You can change the code to look like this:

if (ctype.Id == SPBuiltInContentTypeId.Message)
{
    //do something
}

The result is nearly the same.