Follow Me

Workaround: Version comments not saved in SharePoint 2013

By Stefan Feenstra   /     Oct 31, 2013  /     Office 365, SharePoint 2013  /     1 Comment

Today I found a workaround for the bug I reported a few weeks ago: “Version comments not saved in SharePoint 2013“.

When you have one content type available in the library the version comments cannot be saved when you upload a new file. If you have more than one content type available the version comments can be saved in SharePoint.

Steps to add a content type to the library

  1. Go to the “Library Settings”
  2. Click on “Advanced settings”
  3. Change “Allow management of content types” to: “Yes” and save the settings.

  4. On the “Library Settings” page click on Add from existing site content types.

  5. Add a content type to the library e.g. ‘Basic page’ and save it again.
  6. Now try again to upload the file. Select a file. Fill in the version comments and click on OK.
  7. Click on “Save”
  8. Now when you view the library you will see the version comments you entered at step 6.
Continue Reading

Error sending emails to external users in SharePoint online (2013 experience)

By Stefan Feenstra   /     Oct 03, 2013  /     Office 365  /     0 Comment

In our Office 365 environment I tried to create a SharePoint Designer workflow to send an email to external users. The following error message is displayed in the workflow history: “HTTP BadRequest https://[tenant].sharepoint.com/sites/[sitecoll]/_vti_bin/client.svc/sp.utilities.utility.SendEmail”Unable to send emails external users

I created a new workflow and selected as platform type “SharePoint 2013 workflow”.

SP2013 -Unable to send email external3

It seems like in the new SharePoint Online 2013 workflow engine it is not possible anymore to send messages to unknown e-mail addresses. Microsoft suggested the following workaround: add the users as contact in Exchange. This has the following disadvantage: it takes +/- 3 days to show up in SharePoint.

Add contact in Exchange

Another workaround I found out is to recreate the workflow and select as platform type “SharePoint 2010 workflow” .

Unable to send emails external users

Add the email action to the workflow. And publish the new workflow to SharePoint.

SP2013 -Unable to send email external5

Start the workflow in SharePoint and now you will receive the email message.

SP2013 -Unable to send email external6

Continue Reading

Bug: Version comments not saved in SharePoint 2013

By Stefan Feenstra   /     Sep 27, 2013  /     Office 365, SharePoint 2013  /     1 Comment

Yesterday I discovered a new bug in SharePoint 2013 and Office 365 (2013 experience). When you upload a file to SharePoint using the upload button in the ribbon you get a dialog where you can fill in some version comments. These version comments aren’t stored in SharePoint when you check in the file you uploaded.

Steps to reproduce: 

Make sure you have the same version settings as in the screenshot below.

Document library version settings

Go to your documentlibrary and click in the Ribbon on Upload Document.

Upload Document Ribbon button

You will get the following dialog. Select a file and fill in some version comments.

Upload dialog

Click on Ok and wait untill the file is uploaded to the server. Then the following dialog appears and click on Check in.

Metadata dialog

Now when you check the version history the version comments are missing.

Version history

 

When you follow the same steps in SharePoint 2010 the version comments are stored in the version history.

SP2010 - Step4

 

Some companies heavily rely on the version history and the comments that are submitted.

Update (31-10-2013): Workaround for this problem

Update (27-11-2013): Microsoft released a cumulative update to fix this problem

Continue Reading

How to use ‘Microsoft.SharePoint.Publishing’ assembly in a Sandboxed Solution

By Stefan Feenstra   /     Aug 01, 2013  /     SharePoint 2013  /     2 Comments

When you try to use the ‘Microsoft.SharePoint.Publishing.dll’ in your sandboxed solution you will get the following error:

You could still use the benefits of ‘Microsoft.SharePoint.Publishing.dll’. First download the tool ILSpy (ILSpy is a free .NET Assembly Browser and decompiler). With this tool it’s possible to view the content of this dll file.

For example you would like to configure the associated content type of a page layout programmatically :

Normal solution with Microsoft.SharePoint.Publishing

var exampleContentType = new SPContentType(…
var examplePageLayout = new PageLayout(…
examplePageLayout.AssociatedContentType = exampleContentType;

Solution without Microsoft.SharePoint.Publishing

  1. Load the ‘Microsoft.SharePoint.Publishing.dll’ in ILSpy
  2. Search for the ‘PageLayout’ class
  3. Search for the property ‘AssociatedContentType’
  4. This property contains the following code:

  5. Now when you click on the FieldId.AssociatedContentType reference you will see this is a Guid that references to a field in SPListItem

  6. Conclusion: you could also write:

    var examplePageLayoutListItem = new SPListItem(…
    var AssociatedContentType = new Guid(“b510aac1-bba3-4652-ab70-2d756c29540f”);
    examplePageLayoutListItem[AssociatedContentType] = exampleContentType;
    examplePageLayoutListitem.Update();

Now you don’t need to use the Microsoft.SharePoint.Publishing dll in your solution. (Also working on SharePoint Online)
This was just a very small example of what you can do with the Microsoft.SharePoint.Publishing dll in a Sandboxed Solution.

Continue Reading

Never install SharePoint 2013 on a Domain Controller

By Stefan Feenstra   /     Jul 18, 2013  /     SharePoint 2013  /     3 Comments

Please keep in mind when you want to create a Single Server installation of SharePoint 2013 that you don’t install SharePoint 2013 on a Domain Controller. Some features of SharePoint 2013 don’t work when you install it on the Domain Controller. Today I found one:

When I tried to activate my Sandboxed Solution on my single server SharePoint 2013 installation it failed with the following error:

An attempt to connect to the remote activator failed with exception 'System.Runtime.Remoting.RemotingException: Cannot resolve 'channel' template reference: 'http client'.

An attempt to connect to the remote activator failed with exception ‘System.Runtime.Remoting.RemotingException: Cannot resolve ‘channel’ template reference: ‘http client’.

Then I tried to activate the same solution on a SharePoint 2013 installation with a seperate domain controller server and it worked! And when you leave the feature event receiver commented out it’s also working on the single server installation.

Continue Reading