Skip to main content

Posts

Showing posts from 2013

SharePoint 2013 online Parent/Child relationship - A step by step demo

SharePoint uses lookup fields to represent the Parent-Child relationship. For child list items it is OK as you can trace back to its parent from the lookup field. For parent the OOB forms are not good enough as they are not displaying the children belong to it. In real world it is often required that when view the parent list item it also displays its children, further more it is great if user can add child list items directly from the parent. In SharePoint on-premise we can use visual web parts and code the parent/child logic and use web part pages to replace the parent item forms. In SharePoint online we can't do server model code and visual web parts, so the solution is almost NO CODE and just a little bit client side scripts, and they work beautifully! Here I will do a step by step demonstration to explain the ideas:   Step 1: Create a parent list called "Category" and a child list called "Product", in Product list add a lookup field to reference Cat...

SharePoint online or On Premises?

You will find quite a few articles talking and comparing SharePoint online and on premise. I found an interesting post and just copy and paste below: In April 2011, Microsoft launched Office 365 – a comprehensive set of Software as a Service (SaaS) solutions that allow any organization to obtain hosted, cloud-based access to Exchange, Lync, Office Web Applications – and SharePoint Online . All offer guaranteed uptime, fault tolerance, contractual service levels, and clear, predictable pricing. How Do You Choose Between Cloud and On-Premises? Many organizations start by moving email to the cloud. Few organizations have highly customized Exchange email environments. For many, it’s a no-brainer to migrate existing mailboxes to a hosted version of Exchange, because it simplifies the level of infrastructure support for fault tolerance, recovery, web access, border security, and archiving. And, the services and configuration used for Exchange service on premises are usually the ...

Add Custom Buttons to Edit or Save & Close a SharePoint Page

We all know that in a SharePoint page users can edit it by clicking "Site Actions->Edit Page". Currently the client I am working with wants to display a custom "Edit" button directly on the article page if the user has 'contributor' permission, when editing the page the button should show and do "Save & Close". For this specific requirement I did custom buttons in the page layout and made it work. Please see the code snippet below: Enjoy:-)

Grab Web Essentials for VS

Web Essentials extension for visual studio is a great product for web developers/style developers using visual studio, the 2012 version even support TypeScript! Download them for Free! Web Essentials 2012 Web Essentials I bet you will love them:-)

Some good SharePoint blogs to follow

I have to admit that this post is a refinement from 25+ SharePoint Bloggers to Follow. The reason I did this is I want to provide a little bit more information about the blogs which I found are great from a developer/architect's perspective. Path to SharePoint   Have to say the layout of this blog is a bit old-dated, with categories but no tags, makes it a bit hard to target the specific content you're interested.   Content is mixed with overviews of some solutions plus a few post taking about the "Easy Tabs" (guess it is their product). No code snippet and details.   Richard Harbridge: Insights This blog provides some general overviews/comparisons for SharePoint, could be a good resource for entry level devs or business users.   SharePoint Javascript As the name indicates, this blog contains a lot of posts talking about implementing Javascript with SharePoint to achieve some nice customization.   SharePoint Rescue Rat...

Map SharePoint with local file drive - A complete guide

If you google around you can find quite a few posts talking about this 'simple' solution, but I find none of them gets into deepth, especially on prerequisites. So I write this post and hope it can provide meaningful information for users who need map SharePoint with local file drives. And I will give a short overview and the advantages and comments about this implementation.   Prerequisites You need to make sure the the "WebClient" service is up and runing on your server. If this service is disabled or missing on your server, you will have an error saying "The folder you entered does not appear to be valie. Please choose another"   To check if "WebClient" service is in your services list, just open services and see. If it is missing, please follow the steps to make it available:   Start the Windows Server Manager . In the tree view, highlight the Features node. In the details pane, click Add Features . In the Add Features Wizard ,...

A Step-by-Step guide to use HttpModule in SharePoint with SPContext

I guess you must be familiar with what is HttpModule and how can we leverage it for our web applications. But if not, better have a good read of this article . SharePoint is built on top of .NET, so it has all the rights to use the beauties of .NET. Here I want to demo a simple case of httpmodule on SharePoint. Say if in a company it has lots of site collections and user 'Picky Docky' has access for all of them, for a reason farm administrator want to block him for one of the specific site without change his SharePoint permissions. Here are the steps to do it:-)   Create a empty SharePoint solution add a class file to it named  CustomSecurityModule.cs , code as below Create a feature and scope to "WebApplication" Create a feature receiver. Code as below When activate the feature it will create a modle in the web.config file for the SharePoint web applicaiton you deployed to as below: Enjoy!

SharePoint search on local file drive - Why and How

A team member asked me why in some situation we need to use SharePoint search on local file drive as we can do 'search' directly on the folder in windows. I think it is necessary to do some research to show why and why the benifit is to do this. And more importantly - HOW.   WHY? If you've played around with SharePoint local file search the answer is straight-forward: You can let it search multiple local file drives, but using windows you can hardly do this. SharePoint can search 'into' the real content even the keyword is in content of files in zip file . See the comparison I did a search for keyword 'issue':   Window built-in search: SharePoint search: SharePoint search can easily filter the result by type/date etc. SharePoint can show a bit of content from the files found to give a bit more indication. ... HOW  It's hard to find a step-by-step guide talking about how to make it work. That's why here I am:-)   Go to the f...

User Profile Service Sync Scenarios

Some research about how the user profile service app, and how it stores and cleans up profiles for the following scenarios: - What happens when a user is “Disabled” - What happens when a user is “Moved” into an OU that is NOT flagged for import from AD) - What happens when a user is “Removed” from active directory. When a user is "Disabled" in AD User profile sync will NOT remove the user from SP user profiles. Because this user may still have meta information in site collections. This disabled user will loss previous accesses associated with him, but all the files items/documents/files he was working with will be kept. When a user is "Moved" into an OU that is NOT flagged for import from AD or when user is "Removed" from AD User Profile is marked for deletion in the Profile database. You can't retrive user information from user profile service anymore. User won't be in search result once search crawl refre...

Try the wall with Padlet, it is fun

See my wall :::-) Created with Padlet

Content Type Hub - It's hard to say I love you

Recently some other developers suggested using content type hub for a client project and it created massive overhead: Added complexity for deployment Lots of errors from content type publishing Lookup fields are not supported and we have to use metadata fields, again.. more overhead. My suggestions for anyone what to try content type hub: Do NOT use it if there's no requirement to consume content types by multiple web applications Do NOT use it even you need simular content types in different web applications but you need different customization

How to get HTML5 working in IE and Firefox 2

HTML 5 may be the latest and greatest technology, but some browsers don’t have native support for the new semantic elements. Let’s momentarily forget about the really sexy functionality, like full control over the <video> element , and just focus on getting the elements rendered. The problematic A-grade browsers include IE 8 and below, Firefox 2, and Camino 1 (these last two browsers both use the Gecko rendering engine, which is why they’re both affected). Let’s start with Internet Explorer. IE doesn’t believe in HTML 5 elements Quite simply, IE doesn’t even see HTML 5 elements, much less style them. This is actually the same issue that we had before HTML 5, where the <abbr> element couldn’t be styled in IE 6, resulting in all manner of workarounds . (Let me add that we’ll also fix the <abbr> element while we convince IE to recognise HTML 5 elements). The fix There is hope! The trick, discovered by Sjoerd Visscher , is simply to create the ...

SharePoint 2013: Unexpected response from server issue and how to fix

From time to time when you do some operations such as search using SharePoint 2013 you may see the following error: Unexpected response from server. The status code of response is ’500′. The status text of response is ‘System.ServiceModel.ServiceActivationException’ After having this issue on newly installed SharePoint 2013 farm in production environment, I figure it out that Single server is running out of memory. Especially, thanks to one new process noderunner.exe. Noderunner.exe is the new executable of search service on SharePoint 2013. This process can’t turn it off because Search is one of essential service application in SharePoint 2013, and it is integrated in many features. So, there are some things you can do to reduce the impact of Search on your system. Solution 1 Reduce the Search Service Performance Level with this PowerShell command: Set-SPEnterpriseSearchService -PerformanceLevel Reduced or Set-SPEnterpriseSearchService -PerformanceLevel PartiallyReduced,...

A SharePoint 2013 weather web part

I created a nice SharePoint 2013 weather web part. It has extremely simple code-behind and so easy for you to use or extend.  The core is using Yahoo! Weather Feed Plugin for jQuery Please go to https://weatherwebpartsp2013.codeplex.com/  to grab it. It is free with all the source code. Enjoy!

Gist

If you want to embed source code (e.g. C#, HTML..) to your blog post I recommend to use Gist https://github.com/ . Especially if you want to give your readers the opportunity to copy and paste your code.

How to add Lync presence to a SharePoint 2013 page

1. Add a "Snippet Editor" web part to the web part zone 2. Press "Edit Snippet" 3. Insert the following Snippet, replace the highlighte d parts with correct value <span class="ms-imnSpan"><a class="ms-imnlink ms-spimn-presenceLink" onclick="IMNImageOnClick(event);return false;" href="#"><span class="ms-spimn-presenceWrapper ms-imnImg ms-spimn-imgSize-10x10"><img name="imnmark" title="" class="ms-spimn-img ms-spimn-presence-offline-10x10x32" id="imn_1,type=smtp" alt="Offline" src="http://dpgintranettldev/_layouts/15/images/spimn.png" sip=" Your Email Address " showofflinepawn="1"></span></a></span><span class="ms-noWrap ms-imnSpan"><a class="ms-subtleLink" href="#"> Your Name </a></span> 4. Save - ...