Posts

Showing posts from April, 2015

fix the 'Sideloading of apps is not enabled on this site' problem with PowerShell

In case you are developing an app for SharePoint 2013 and you are not developing on the server you can get the error 'Sideloading of apps is not enabled on this site'. When that happens you do not have the sideload developing feature activated. It is a hidden feature and allows you to develop apps from client devices. All you need to do is to enter the following line into PowerShell on the server. Enable-SPFeature e374875e-06b6-11e0-b0fa-57f5dfd72085 –url <yourSharePointURL>

InfoPath render problem with the Server State Service on SharePoint 2010

Image
I tried to transfer a InfoPath form from one SharePoint to another. After it was done i wanted to open the form and this is what I got:  The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator. Normally this should not happen, because the Server State Service will be installed in the SharePoint wizard automaticly, but somehow it does not. In this case there are some easy PowerShell commands to solve the problem.

The fast List search in SharePoint 2010

Have you ever noticed the search in SharePoint 2013 lists? It is pretty cool, because you get what you want and that on a fast way. Did you or a client ever had the wish to use it on a SharePoint 2010 to? Well that is pretty easy. All you need to do is to add a Code Editor Web Part over your list. Enter into the list the following code:

How to create custom Page Layouts in SharePoint 2013

Before you create a Page Layout there are two questions: - What is a Page Layout? and - What do you need to create a Page Layout? What is a Page Layout? A Page Layout is a way to design content on sites. You can create content areas and place them with CSS. Simplified: it is like a form for list items. A site is nothing else than an item in a library, so you can see the layout, that you build, as the display form, the edit form and the new form. What do you need to create a Page Layout? You will need to download and install the SharePoint Designer 2013 , but the most important thing, to make you the less work as possible, is that you know what you want to design and what content you want to display. I recommend you to create a custom Content Type for your Page Layout. It will make it a lot easier to add all the columns you need. It is also recommended to got some knowledge in HTML, ASPX, JavaScript and CSS.

Fix the MailItem.Send() warning

Sometimes you need to create and send mails in your code. There are many ways to solve this requirement. You can connect to your Exchange with WebServices or you can use a WebService to connect to a SMTP server. But what if you are not able to connect to them, but you know the client is using Outlook. You can call Oulook to send your mails. That is pretty easy all you need is the interop namespace of Outlook (using Oulook = Micosoft.Office.Interop.Outlook;). The code you need for this should contain lines of the following snippet: 1 2 3 4 5 6 // ..call Outlook .. // create the mailitem Outlook.MailItem mItem = outlookapplication.CreateItem(Outlook.OlItemType.olMailItem); // ..set subject, body recipient and much more.. // send the mail mItem.Send();

SharePoint 2013 WebPart with custom properties

Image
If you created a WebPart for SharePoint 2013 and you want the user to customize it, you will need properties. Setting them up is not that easy as you think. You need to edit two files. Lets begin with the <yourWebPart>.ascx.cs file. What you will do there is setting up the propertiesobjects. Later you can use them to read the values the user typed in. I make a difference between two kind of properties: 'easy' and 'not that easy properties'. I do not call it 'not that easy', because it is hard to use, I call it that way because you need a line of code more. An easy propertiy would be a textfield. The code you need to add would look like this. 1 2 3 4 5 6 7 [WebBrowsable(true), WebDisplayName( "<youtDisplayname>" ), WebDescription( "<yourDescription>" ), Personalizable(PersonalizationScope.Shared), Category( "<yourCategoryname>" )] public string customTextProperty { get ; set ; }