Friday, September 9, 2011

Reserved Querystring Parameters In SharePoint

This is probably the 100th post on the net about...
"Be careful when naming querystring parameters in your SharePoint applications"

But you can't say it enough. They cause trouble!
For more info read this.

Wednesday, September 7, 2011

Could not access the Search administration database. A generic error occurred while trying to access the database to obtain the schema version info.

Deleting the following registry key - did the trick for me:

“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS\Services\Microsoft.SharePoint.Search.Administration.SPSearchService”

In fact, it's just one of the things that need to be verified.
Read this post for more info.

Saturday, June 11, 2011

Default location picture upload in RTE

If you want to insert a picture in the rich text editor directly from your computer, you will notice that the RTEUploadDialog pops up in which you can browse for a file and select a location.

!cid_image001_png@01CC25D2!cid_image002_png@01CC25D2

Unfortunately, you can’t set the default location.

Workaround

Option 1: Because the “Upload to” dropdown list is filled up alphabetically, you can rename the library you want (eg. let it start with an underscore).

Option 2: (Not supported by MS) You can write some javascript to select another default value for the dropdown list. Insert your javascript into the RTEUploadDialog application page (/_layouts/RteUploadDialog.aspx).

As far as I know, this page is not only used for uploading images, so you probably have to take into account the querystring parameter ‘Dialog’ (/_layouts/RteUploadDialog.aspx?LCID=1033&Dialog=UploadImage).

Sunday, April 10, 2011

Reporting Services: RSViewerPage

The main file used for displaying reports is the RSViewerPage.aspx. This page contains a breadcrumb and a webpart called ReportViewerWebPart. This webpart renders a toolbar, the report and a parameters pane.

Hide buttons from the toolbar

I saw a couple of articles of people who disable some toolbar buttons by diving into the ConfigurationInfo table of the Reporting Services Database. This method will work for a few buttons, but not for all of them. I discovered that you don’t need to adjust that database table at all. You can use the ToolBarItemsDisplayMode property of the ReportViewer WebPart. This property allows you to hide/show specific parts of the ReportViewer’s toolbar. Be aware, this property is an enumeration field.

For example: ToolBarItemsDisplayMode=’223’ will hide:

  • Open with Report Builder (Action Menu)
  • Subscribe (Action Menu)
  • Atom icon

Before:

Toolbar

After:

Toolbar2

Why 223? You have to make the sum of the values of the parts you want to include in the toolbar. The values are shown in the reference table below:

ToolBarItemsDisplayMode

You can set the property by adding the property in the RSViewerPage.aspx like

<RSWP:ReportViewerWebPart id="m_sqlRsWebPart" runat="server" SuppressWebPartChrome="true" Height="100%" ToolBarItemsDisplayMode="223" Width="100%" />

OR

You can pass the property as a querystring rv:ToolBarItemsDisplayMode=”223”

Related posts:

Thursday, February 10, 2011

Ogone – Feedback Parameters

The merchant can send some extra parameters in the hidden fields of the order form, in order to retrieve them as feedback parameters after the payment.

One of the hidden fields is the PARAMPLUS parameter. This field submits some parameters and their values you would like returned in the feedback request (as a querystring).

Be careful when you generate your SHA-OUT hash based on the incoming feedback parameters. You have to exclude all the extra parameters, you sent with the PARAMPLUS parameter, before generating the hash.

Tuesday, January 18, 2011

SharePoint Designer 2010 Action: Start Approval Process

The “start approval process” is a brand new workflow activity available in SPS 2010.

The Start Approval Process action behaves like a pre-built workflow—the logic is already defined in the action. The action has several different phases built into it that defines task behaviors, task process behaviors, logging to the History Log, e-mail notifications, and completion conditions. Although the action comes with pre-built logic, it still needs information from you—such as the users (the reviewers), the order in which the tasks are to be routed to the participants—serial or parallel, the default is serial, and the due dates for task completion.

You can customize the predefined logic within the activity by clicking on the ‘approval hyperlink’ (as shown below).

A quick example:

The out-of-the-box approval workflow includes the following settings in his association form: End on first rejection & End on document change.

WF1

As far as I know, you can’t set these settings by default in this activity. If you want to apply this behavior to your own build workflow you can, for example, customize your initiation / association form with two extra checkboxes and pass the values to the workflow or you just can remove the condition so that they’re ‘checked’ by default. The screenshots below give you an idea of how to (remove the ‘if clauses’ way) enable this behavior.

WF2

You can find the behavior of the End on first rejection in the ‘change the behavior of a single task’ section.

WF3

First, move up the logic within the condition. Then you can remove the condition.

WF4

You can find the behavior of the End on document change in the ‘change the behavior of the overall task process’ section.

WF5

First, move up the logic within the condition. Then you can remove the condition.

WF6

That’s it.