Tag Archive 'Microsoft'

Aug 26 2008

CRM4 Web Service Errors

Published by under Programming

As well as starting to work with SharePoint in the last two months, I’ve also been doing some development in Dynamics CRM4.  In the past week I’ve been porting an ISV add-on that was written for CRM3.  Whilst most of the code is pretty much the same, there are a few gotcha to watch out for.

The first problem I came across was the web-service authentication.  I’m not a CRM expert but I believe this has something to do with the new multi-tenancy installation option.  Now when you connect to a web service you need to create a CrmAuthenticationToken and pass it to the web service.  This allows you to specify which organisation you are connecting to.

Once connected to I started getting the following error when running a FetchXML query:

  <description>An aggregate operation was initially specified, but no aggregate operator was encountered.</description>

This error was being generated by the following FetchXML query:

<fetch mapping="logical" aggregate="true">
   <entity name="account">
         <condition attribute="accountid" operator="eq" value="edd2b749-9f58-dd11-90aa-00155d0a0e03" />
      <link-entity name="contact" from="accountid" to="accountid">
         <attribute name="contactid" aggregate="count" alias="myCount" />

The purpose of this query is to count all the contacts that are linked with a specific account.  It does this selecting an account entity with a specific id and then counting all the contact id’s for the contacts that are linked to the account.

For some reason the xml parser finds the aggregate=”true” flag but doesn’t find the count aggregate on the linked entity.  Quite why this works in CRM3 but not in CRM4 is beyond me but what I do know is that turning this query around works:

<fetch mapping="logical" aggregate="true">
   <entity name="contact">
      <attribute name="contactid" aggregate="count" alias="count" />
      <link-entity name="account" from="accountid" to="accountid">
            <condition attribute="accountid" operator="eq" value="edd2b749-9f58-dd11-90aa-00155d0a0e03" />

In this case the query is run against contract and the id’s are counted where they are linked to a specific account.  I assume this works because the aggregate attribute is on the root entity.  I haven’t tested if it is possible to add more aggregates to the link entities or not.

One response so far

Jul 14 2008

SharePoint Event Receiver Manager

Published by under .NET,Programming,Software

One of the things I’m working on is Event Receivers in SharePoint but I’ve found registering the event receivers to be a bit on the annoying side.  Yes you can do it with the feature.xml Receivers section and there is the great El Blanco Event Receivers Manager.

EventReceiverManagerI personally prefer desktop GUI applications and so, based on code by Liron, I’ve created my own desktop Event Receiver Manager.  It allows you to select site & list, browse for an assembly so it can give you the full assembly name and a list of classes inside, and a list of receivers you can attach to.

The current version only allows adding new event receivers.  Before adding a new receiver it will check to make sure the same receiver doesn’t already exist.

Future plans for it include listing existing receivers to allow users to delete them but as I don’t need to do that myself yet I haven’t implemented it.

Download a copy of EventReceiverManager.

3 responses so far

Jul 11 2008

SharePoint Link List – Part 4

Published by under General

These are a selection of list of links that I acquired on a recent SharePoint developer course with Patrick Tisseghem of U2U.  This is part 4 of a 4 part series:

Handy Hints

creates sql server database for builtin ASP.Net features such as membership database for forms authentication.  Found in %windir%\Microsoft.NET\Framework\v2.0.50727

To upgrade webpart assembly numbers (incremental version numbers)
deactivate feature -> remove webpart from webpart gallery -> upgrade webpart solution -> add old version back into web.config safe controls -> add bindingRedirect from old version to new version into web.config

EventReceivers for ContentTypes
These are same as for lists and libraries but information is stored in XmlDocument section of feature.

Attribute in asseblyinfo.cs to allow webparts to be installed and run from bin folder

Use Frontpage RPC for uploading documents
e.g. migrating files from other systems.


Inside Microsoft Office SharePoint Server 2007

Professional SharePoint 2007 Web Content Management Development

No responses yet

Jul 10 2008

SharePoint Link List – Part 3

Published by under Programming,Technology

These are a selection of list of links that I acquired on a recent SharePoint developer course with Patrick Tisseghem of U2U.  This is part 3 of a 4 part series:


Windows Workflow Foundation
An introduction and kick-off point for developers wanting to get started with Workflow Foundation.

Custom Workflow Activities
A set of handy SharePoint workflow activities for people that don’t want to get their hands dirty creating their own custom workflow activities.


Microsoft search services
Information on the Microsoft Search Server family of products.  Aimed more at decision makers than developers.

MOSS Faceted Search AddOn
A most excellent add-on for the MOSS search system.  Allows for quick and easy refining of search criteria.


Silverlight for Sharepoint BluePrints
Demonstrations of how Silverlight can be used with SharePoint.

Vertigo – FamilyShow
Example of using Silverlight in SharePoint

Deep Zoom Composer
Nothing to do with SharePoint but a very cool application.  Useful if you want to embed a Deep-Zoom show in SharePoint ;)

No responses yet

Jul 09 2008

SharePoint Link List – Part 2

Published by under Programming,Technology

These are a selection of list of links that I acquired on a recent SharePoint developer course with Patrick Tisseghem of U2U.  This is part 2 of a 4 part series:


STSAdm extensions
A set of extensions to STSAdm.exe that make just about any SharePoint administration task a piece of cake.  The extensions are packaged as a SharePoint solution package (.wsp) and are installed with the STSAdm.exe utility itself.

Sharepoint Project Utility
A utility for VS developers for creating the standard directory structures and default files for various SharePoint development scenarios.  Requires the installation of the DX Core VS addin.

VS2008 Sharepoint Extensions
A set of projects and project items for VS2008 for SharePoint development.  My initial investigation suggests that these may be geared more towards MOSS2007 than WSSv3.

Event Receiver Management – El Blanco
Allows management of event handlers to specific lists, libraries, etc.

Application Pool Manager
System tray access to IIS Application Pool tasks.  Runs on the machine that SharePoint is installed on.

Fiddler – HTTP Debugging
Useful tool for finding FrontPage rpc calls for uploading and downloading documents.

Expresso Regular Expressions
Wonderful utility for developing and debugging .Net regular expressions.  Once you’ve created and tested your regular expression, Expresso can generate stub .Net code to get the regular expression into your project.

Caml Query Builder
I’ve not had any experience with CAML yet but I’m sure I’ll be using this tool when the time arises.

Word Content Control Toolkit
Assists with binding xml embedded in a Word 2007 docx file to controls in the Word document.  Useful for generating Word documents containing data from SharePoint.

SmartPart for SharePoint
The SharePoint web part which can host any ASP.NET web user control. Create your web parts without writing code!

One response so far

Jul 08 2008

SharePoint Link List – Part 1

Published by under Programming,Technology

These are a selection of list of links that I acquired on a recent SharePoint developer course with Patrick Tisseghem of U2U.  This is part 1 of a 4 part series:

Articles & Blogs

SharePoint Developer Site

John Holiday

Ted Pattison Group Downloads
A host of utilities, demos and articles.  Also, check out the rest of the site.

Ideas & Solutions, Etc.
A host of handy hints & tips.

Content Deployment
A guide to website content management and deployment using SharePoint.

OpenXML Developer
Not really SharePoint specific but a developer site for working with the office documents OpenXML standard.  Useful for developers wanting to tie SharePoint data into Word documents (see Word Content Control Toolkit in Part 2 – Utilities).

3 responses so far

Jul 02 2008

Re-Installing Windows Sharepoint Services

Published by under Programming,Software

Part of my job with Contract5 I have to do development on the Windows Sharepoint Services platform.  In order to facilitate this I setup a VMWare virtual machine with Windows 2008 Server, Sharepoint and Visual Studio 2008.

However, I made the bad error of deciding to change the computer name once all of the above was installed.  Unfortunately I didn’t realise that the computer name was so deeply rooted in the Sharepoint installation.  I also tried reverting the computer name back to it’s original value but this didn’t seem to make much difference, if anything it made the situation worse.

No amount of removing Sharepoint and re-installing it made any difference as the original settings still seemed to be there.  Eventually I gave in and completely rebuilt the VM.

I have since discovered that my problems were all due to the four Sharepoint databases that got installed the first time round which are not removed when Sharepoint is un-installed.  I have found a this knowledge base article on removing the Sharepoint databases: http://support.microsoft.com/kb/920277

No responses yet

May 30 2008

Large Downloads From Microsoft

Published by under General

For my new job, which I’ll be starting in a little over three weeks, I’m going to be working heavily with Microsoft SharePoint (MOSS 2007 – I’ll leave the versions for another post) and Microsoft Dynamics CRM 4 (again a guide to version can wait for another post).  Whilst there is loads of information out there about development with these two platforms, what someone starting out with these needs to some hands-on experience.  

It’s wonderful reading about creating custom workflows in CRM but right now I’m suffering from serious information overflow because I’ve got all these theoretical concepts flying around in my head without being able to see how they work in reality – a picture is worth a thousand words but an hours hands-on experience is worth a thousand pictures.

Microsoft has been kind enough to provide free pre-configured demonstration Virtual PC disk images for free that allow you experiment and test without the cost or time spent in setting up your own server.  The images themselves are about 4Gb to download.  Considering all the software installed on them that isn’t too bad.  The trouble is that Microsoft has split these images into 700Mb self-extracting rar files that have to downloaded separately and extracted, which requires upwards of 8Gb of free space.

Over the past couple of weeks I have made several attempts to download the files but I have yet to get a working copy on my machine.  I have had problems with disconnection’s, running out of disk space (my bootcamp partition was too small) and corrupted files when they did download.  The fact that I have to download multiple files is a serious pain in the ass.  Why can’t Microsoft provide the disk images as a single file and embrace BitTorrent for distribution.   I’m sure it would be a lot quicker and less error prone.

In the meantime my new employer is sending over a portable hard drive with the disk images on it for me to use.

No responses yet

May 20 2008

Is Microsoft About To Buy Zend?

Published by under PHP,Programming,Technology

Microsoft has been trying to make itself F/OSS friendly recently.  From agreeing not to sue open source projects to working to provide a bridge between it’s proprietary source management system (TFS) and the much loved open source alternative SubVersion.  Microsoft seems to be trying its best but still appears to be keeping open source at arms length.

The question is: is Microsoft ready to get into bed with open source itself.  Enter Zend.  Zend is an Israeli company that has grown up around the open source scripting engine PHP.   Previously Microsoft announced that it would be working with Zend to provide better support for PHP under Windows Server.

In the last day or so it has become apparent that Zend is laying some of it’s staff. Erick Schonfeld has speculated that this may be to make Zend more attractive to a prospective purchaser.  With Microsoft on the verge of finally to a deal to buy (some if not all) Yahoo, it may Zend may also look attractive if Microsoft is to continue supporting the applications that Yahoo has running on PHP.

There is also the long awaited dynamic language support for .Net.  Maybe PHP could be leveraged to bring more hobbyist developers over to the .Net platform.  Obviously there is the question of getting the .Net framework ported over to alternative operating systems, however Silverlight has demonstrated that they might not be adverse to that idea.

Of course, Oracle has also previously shown an interest in PHP and it would sit nicely alongside MySQL, which that previously purchased.  And then there is IBM, who also seem to be embracing open source as their extensive use, distribution and support of Java show.

No responses yet

« Prev