Posts

Sharepoint 2013 SSL Certificate for Development - Self Signed

We are looking to implement CRM 2011 - SharePoint 2013 integration to leverage document management functionality in SharePoint. The recommended way is to enable SSL on both sites so I want to enable SSL on my development box SP site. There are useful and working steps on how to enable SSL on SharePoint 2013: http://blogs.msdn.com/b/fabdulwahab/archive/2013/01/21/configure-ssl-for-sharepoint-2013.aspx http://griffindocs.wordpress.com/2013/03/20/sharepoint-2013-how-to-add-ssl-to-a-web-application/ However after installing certificates (also on my testing machine) I got the SSL Certificate Name Mismatch Error .  This turns out that when you create Self Signed SSL Certificate, it defaults to your machine name and you don't have the option to change the host header. The solution is to use the SelfSSL program that will allow you to create certificate that points to your site host header as mentioned in this post: http://www.robbagby.com/iis/self-signed-certificates...

jQuery chart or graph printing cross browser

Image
Hi all, sometimes we want to produce a fancy graph or charts on our client side code. There are numerous libraries out there to assist with this requirement.  Having used jQuery, when searching for a plugin you will first notice the free jqPlot . In fact this is what has been used in the website I work with. The graph looks fine when generated. When the users asked for a printing functionality - this is where all the fun begins, the graphs screw up (either not showing or position has shifted) in certain browsers. There are three factors to look at when you encounter this issue: 1. Your print.css file 2. Whether you show your graph in a modal window (such as jQuery UI dialog) 3. Cross-browser issue Normally what we want is to just use window.print instead of specific print functionality provided by the 3rd party library if they exist. This is because we want to print other content as well and not just the chart. After searching for alternative library, I cam...

Sharepoint 2013 - Export Import Term Set Navigation

Hi All, Update on TermSet import/export script, thumbs up to my colleague Mark Spurling in creating the PS script. This script handles all nodes along with the TargetUrl. HTH, Andreas

SharePoint 2013 - Read web part properties with client side JavaScript.

Hello, Sometimes we want to be able to read web part properties on our client side code, e.g. when we want to use jQuery functionality to implement certain requirements. Easiest way to achieve this is just use the asp:HiddenField control to store the value of the property, then get the value using jQuery. So on your html: Then on the JavaScript section: On your ascx code behind file, just store the value during page load: Hope this helps, Andreas

SharePoint 2013 The name 'InitializeControl' does not exist in the current context

The storyline: I created a visual web part inside my VS2012 solution. Every time I saved the ascx file I had to wait for a few seconds as my VS was 'Communicating with SharePoint'. If you are the type of person who has an addiction of hitting 'Ctrl + S' after modifying a few lines of code then you will find this annoying. Then I tried to switch my solution to 'Offline' to avoid this. I wrote my code and when I did a build it throws me this error. After further investigation it seems that my ascx.g.cs file disappeared. Now I know why it was 'Communicating with SharePoint' every time I saved the file. It's generating the g.cs file that has the InitializeControl function.  So to get it back working, I just switched to online mode, then re-saved my ascx file and voila! my g.cs shows up again.  Interested to see if other people have any ideas to make this faster process. HTH, Andreas

SharePoint 2013 Rest API and Knockout JS

Image
Hi all, Most of the times in public facing websites you want to have a nice fast interaction for users to be able to get the information and we want to display it in a nice looking way. For example a simple question with responses like this: where user can click Yes or No and the response will show and they can go to the next question.  To achieve this we can easily leverage SharePoint capabilities for storing the questions in the list and access them through the REST API. For rendering and interaction we will use the mighty Knockout JS making it all nice and easy. First step is to create your SharePoint list to store your questions: Then you can create a web part to host this little wizard. In your visual web part ascx file, the first thing we want to do is to create a viewmodel and get the data from our list. Using the REST api and with the help of knockout mapping (or wrap) we can get our observables easily. Below is the complete js on my page Then...

CRM 4.0 Useful FetchXML Javascript Helper

Hi again, Although most of you would say CRM 4.0 is outdated, but unfortunately some companies are still using them :) (I know we are in the process of migrating). However just want to let you know I found a post here  that provides useful javascript function to retrieve record through fetchXml. It is useful for let's say based on the lookup id you want to get all the attributes and populate other fields in the form. I have extended that function so you will be able to get attribute lookup name as well (if you want to populate a lookup field). To use it you can do something like this: Hope this helps, Andreas