June 26th, 2013 | Categories: Software

Let’s face it. Internet Explorer is still the best browser for using with SharePoint. If you or any of your clients have a different default browser you might run into issues if you place a shortcut to SharePoint on your desktop.

To make sure that SharePoint opens in Internet Explorer (considering you still have it installed), you can do the following:

  1. Copy the shortcut to Internet Explorer to your desktop (or make a copy if you already have one). Do not copy existing links to any sites.
    Create an extra shortcut to IE on desktop
  2. Rename shortcut to make sense
    image
  3. Right click it, select Properties and select Shortcut tab. Now in the Target field leave original text and add completely at the end (outside of quotation marks) the URL to your SharePoint site
    image 
  4. Confirm changes with OK key and enjoy your IE SharePoint experience
January 10th, 2013 | Categories: SharePoint 2010

The same way as we can use JavaScript Commandlets from favorites in your browser, you can also use them in your SharePoint List Ribbon. In this example we’ll create a button in the NewForm List ribbon that will open the form in a new tab without modal dialog.

First let’s prepare. We’ll need two icons for the button – a 16×16 and 32×32 version. You can use samples below:

fullscreen16  fullscreen32

Now let’s open the site with SharePoint Designer and upload the two images to the site (either images folder in SharePoint designer or any document/picture library).

Next in SharePoint Designer select the Lists and Libraries option under Navigation and select the list you need to add your custom button to.

Select Lists and libraries and your list

With the list open in SharePoint designer, click the Custom action button and select New Form Ribbon.

Custom action - new form ribbon

In the popup window fill in the name and if needed description of your new button:

Enter name and description

In the Select type of action select Navigate to url and enter the following in the box below:

javascript:var d=document.location.href.replace(‘&IsDlg=1′,”);window.open(d);

Select third and paste the javascript

Now all that remains is to select images for the button in the last section:

Take care of images

And leave the rest of settings to default.

Now you should see your newly created custom action in the Custom actions section

The result

In some cases SharePoint designer won’t add this. In that case set the Navigate to url to some valid url (http://www.sharepointboris.net :) ), complete the process, then edit the custom action and replace link with your JavaScript.

Without any further ado you can immediately see results:

The result - before click  The result - after click

Why you might need a popout you might ask? simple… for bookmarking, linking,…

June 26th, 2012 | Categories: SharePoint

Where? In Kranjska Gora, Slovenija

When? On 26th and 27th November 2012

Why? Good presentations, lots of knowlege to gain, lots of interesting topics.

Who? MVP, MVP, MVP, MVP and more and lots of other great presenters. I’ll be presenting thre this year again too.

Who again? Returning legends like Zlatan Džinič, Claudio Brotto, Toni Frankola, Michael Noel, Joel Oleson, Paul Swider, local heroes like me, Dejan Sarka, Uroš Žunič, Robi Vončina, along with new special guests. See us all here.

What about? Topics are still being selected. I’ still haven’t decided what my topic would be. Should it be “Enhancing SharePoint through JavaScript”? Or “Silverlight and SharePoint Reloaded”? Or perhaps Workflows in SharePoint. Maybe you can help me decide. I will also take the chance to unveil the successor of SPCD, which is already being tested.

Kranjska where? In Hotel Kompas in Kranjska Gora in Slovenija. More info about hotel here. How to find the hotel? You can check directions on hotel’s website or find the hotel on Bing Maps.

More information and reservations: Check Organizer’s (Kompas XNet) website.

June 26th, 2012 | Categories: SharePoint 2010

A lot of times I prefer to open a link in a modal dialog instead of new window or even same window. SP.UI has a function to open a modal dialog, but a lot of times you don’t need to create that function. A lot of times I just prefer to use SharePoint’s built-in function. So to open a page in a modal dialog just change your link from

<a href="http://your-sharepoint-url-address">your link name</a>

to

<a onclick="NewItem2(event, this.href); return false;" href="http://your-sharepoint-url-address">your link name</a>

This code ofcourse works in SharePoint designer and other areas in SharePoint where you have SP.UI loaded. It also doesn’t work in rich text fields in SharePoint as the JavaScript gets filtered out.

April 23rd, 2012 | Categories: JavaScript, SharePoint 2010

One of the things that I was using in SharePoint 2007 and is GONE in SharePoint 2010 is the ability to open a link in top navigation or in quick launch in another tab. This still works in SharePoint 2010 if you’re not using Internet Explorer. But in IE when right clicking a link in quick launch or in top nav, you will find "Open in new tab" or "Open in new window" missing.

image

But after running the bookmarklet from favorites or favorites bar

image

Right click again and the desired options are there Smeško

image

The bookmarklet is available in my JavaScripts Library.

April 19th, 2012 | Categories: JavaScript, SharePoint

I was already describing the way to get SharePoint List Column’s internal name. Now I’ve prepared a simple tool that you can embed in your browser for an even faster insight.

How to "install" the bookmarklet?

1. Navigate to my JavaScripts Library page.

2. Under Bookmarklets you will find a link. Drag it to your browser’s favorites bar or favorites.

 

How to use the script:

1. Open SharePoint List settings page. In this example we’ll open a Contacts list’s settings. Pay attention to the "Columns" table

image

2. Click the link you’ve added to your bookmarks:

image

3. See your Columns table again

image

 

This just temporarily modifies the page. The column will disappear with the next page refresh. But meanwhile you can even copy-paste.

I’ve tested it with IE 9, FireFox and Chrome.

December 22nd, 2011 | Categories: SharePoint Designer

Recently I’ve stumbled on a strange error in SharePoint. In the entire site collection I couldn’t start any workflow (nobody could). If workflows were set to start automatically, they would fail immediately with the message Failed on Start (Retrying)

If they were set to manual start after clicking the Start button on the workflow initiation form, nothing would happen.

In SharePoint logs I’d find the following message:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.     at System.ThrowHelper.ThrowKeyNotFoundException()     at System.Collections.Generic.Dictionary`2.get_Item(TKey key)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.IsConfigForSite(SPSite site)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.GetWorkflowConfurationSection(SPSite site, String section)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.EnsurePluggableServices(SPSite site, SPWorkflowExternalDataExchangeServiceCollection services, ExternalDataExchangeService existingServices)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices..ctor(SPSite site, SPWeb web, SPWorkflowManager manager, SPWorkflowEngine engine)     --- End of inner exception stack trace ---     at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)     at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)     at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.LoadPluggableClass(String classname, String assembly, Object[] parameters)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.GetService(SPWorkflowAssociation association, SPWorkflowEngine engine)     at Microsoft.SharePointWorkflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 events, SPWorkflowRunOptionsInternal runOptions)

On another site collection on the same server workflows were working normally.

I’ve tried to resolve the problem with the solution described here but unfortunately it didn’t work.

At the end what worked for me was to re-enable workflows on site.

In Central Administration select Application Management and Manage web applications

image

 

Next select the failing Web application

image

Now click arrow under General Settings in the ribbon and select Workflow

image

Select No for "Enable user-defined workflows…" and click OK.

image

Now reopen the Workflow settings dialog by clicking on General Settings –> Workflow again

and select Yes, to re-enable user defined workflows.

image

Confirm your selection by clicking on the OK button.

This got my workflows up and running again.

December 13th, 2011 | Categories: CodePlex

A while ago I prepared a simple solution on CodePlex that helps to reattach broken lookup columns (due to restore, migration,…).

There is an update available – on the same place – CodePlex. The project is still a small console application.

How to use it? Run it and follow instructions.

Click here to download the latest release.

December 12th, 2011 | Categories: CodePlex

Have you ever found yourself in a situation where you’ve followed recommended practice to use also AD groups? Perfect. So you create an AD group, add some users to that group and next you add that group into a SharePoint security group. Good. Now three months from now if somebody asks you to list all members of that group, what do you do? Remote to your Active directory and list (or printscreen) the group’s members.

Now thanks to my friend’s solution, you can tell them to go see for themselves. Robi Vončina has prepared a solution to list AD group members directly on your SharePoint site. It’s a nice solution to see who’s messing around your site.

The solution can be found on CodePlex.

November 23rd, 2011 | Categories: SharePoint administration

If you find a lot of DCOM errors with event ID 10016 in your application server role, this may be due to Windows Server 2008 R2. Here’s how to resolve these isuses

On the failing server open Server Manager, and under Roles select Application server. You will most probably find quite a lot of DCOM errors. Open one of those errors to see for which user and for which service the authentication is failing. In the open window copy the GUID of the failing service. It will help you identify the service.

image

Next open registry editor and select the root node. In Edit menu select Find, paste the GUID and click Find next.

image

You can find the service name in one of the registry’s values (as seen on the screenshot below, in my case it was IIS WAMREG).

image

Leave the registry editor open (you might still need it).

Next in Start menu under Administrative tools click Component Services. Expand the Computers node and My Computer. Select DCOM Confing. Now locate the service you identified in your registry, right click it and select Properties.

image

In the open dialog select Security tab and in the Launch and activation permissions group click the Edit button.

image

If you have this entire tab grayed out, you need to do the following (outlined in the gray, otherwise skip the gray part below):

In registry editor (which I hope you still have open), right click the node you found and select Permissions

image

Click Advanced and select the Owner tab. Change the owner to the account you’re logged on or to the administrators group (which I presume your account is in)

image

Click Apply and in the permissions dialog also give same user/group full control

image

Now you should close and reopen Component services and find the DCOM service.

In the permissions dialog for the service grant the failing user (or group the account is in) Local Launch and Local Activation permissions. And in case the event log says it is failing remote launch, grant the user remote launch and service also.

image

Confirm all the changes and close registry editor and Component services window.