Author Archives: Bernado

Unknown's avatar

About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.

How to enable Export on custom SharePoint web part

By default your custom SharePoint 2010 web parts will not have the Export command enabled. To enable this command, in your .webpart file, add the following element in the <properties> section: <property name=”ExportMode” type=”exportmode”>All</property>

Posted in SharePoint 2010, WebPart | Leave a comment

Free alternative to Reflector!

So happy I found this had to blog about it: http://wiki.sharpdevelop.net/ilspy.ashx. Still in Beta but looks very promising. Woohoo!

Posted in Stuffs | Leave a comment

Can’t get UpdatePanel in your web part to do AJAX-postback?

If your web part is creating the UpdatePanel dynamically, e.g. in the CreateChildControls() method, check that: The UpdatePanel has an ID assigned The UpdatePanel’s UpdateMode property is set to Conditional. The default is Always. The control triggering the postback (e.g. a … Continue reading

Posted in AJAX, SharePoint 2010, WebPart | Leave a comment

Can’t get RemoveFieldRef in your custom content type schema to work?

Check that: The Inherits attribute in <ContentType> is FALSE Check the casing of the GUID specified in <RemoveFieldRef>. My testing shows that this is case-sensitive. On the latter point above, it is best to write a harness program to check … Continue reading

Posted in Content Types, SharePoint | Leave a comment

Error occurred in deployment step ‘Activate Features’: Object reference not set to an instance of an object.

If you are getting this error when deploying your solution using Visual Studio, then check that your feature receivers you are not using objects that would be null when the code is not running under an HTTP context. SPContext.Current for example … Continue reading

Posted in SharePoint 2010 | Leave a comment

How to set AvailableWebTemplates to custom WebTemplate created via features

In SharePoint 2010 you can use the new <WebTemplate> element in a feature to create a custom web template (sort of equivalent to site definition). Good overview of how this compares to other methods of creating site template/definition: http://sharepointchick.com/archive/0001/01/01/site-definitions-vs.-webtemplates.aspx. In a … Continue reading

Posted in SharePoint 2010, WebTemplate | Leave a comment

How to force Expiration/Retention policy to execute on SharePoint 2010

The Expiration/Retention policy (part of Information Management Policy) is executed by a couple of timer jobs. In 2007 these jobs are under the PolicyConfigService at the Farm level, and you can modify the schedule of these jobs to run very … Continue reading

Posted in Information Management Policy, SharePoint 2010, Timer Job | 4 Comments

AutoSPInstaller keeps installing SharePoint binary after restart

AutoSPInstaller (http://autospinstaller.codeplex.com/) is a neat tool for unattended SharePoint install and configuration. I ran into an issue where AutoSPInstaller just seems to get stuck in a loop. After SP is installed, it prompted me to restart the server and re-run … Continue reading

Posted in AutoSPInstaller, SharePoint 2010 | Leave a comment

Pass-through XSL for debugging

When debugging certain webparts (e.g. CQWP), you often want to see the raw XML before the XSL is applied. The XSLs below (developed by a colleague) will spit out the original XML.   This one below renders the XML as a table, with … Continue reading

Posted in WebPart, XSL | 1 Comment

Complex formatting for BCS TypeDescriptor with complex type

I was playing around with specifying ComplexFormatting and FormatString for my BCS model entities. Here are the lessons learnt: The ComplexFormatting property must be specified at the parent TypeDescriptor containing the complex type, not at the complex type TypeDescriptor itself. … Continue reading

Posted in BCS, SharePoint 2010 | Leave a comment