Synchronous plugins want localhost

Posted on February 22, 2008 16:55 by George Doubinski

Yesterday I was working on some plug-in code which was working fine earlier. I changed pipeline to synchronous and started to get consistent "404 - Not Found" error from calls to CrmService. I reduced the problem to something like this:

public class MyPlugin: IPlugin
{
    public void Execute(IPluginExecutionContext context)
    {
        ICrmService service = context.CreateCrmService(true);
        account a = new account();
        a.name = "test";
        service.Create(a);      // this line fails with 404
    }
}

And it just was not working. We all know about very "informative" SoapException which would have been fine but I was getting simple http-level 404. Something was pointing somewhere it shouldn't have... More...

Currently rated 4.1 by 7 people

  • Currently 4.142857/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Packaging plugins

Posted on February 22, 2008 04:09 by George Doubinski

You spent years polishing your algorithm, moving bytes around, replacing strings with StringBuilders, extracting every last bit of performance from your code. The assembly Acme.CoolTools.dll is into its' 3rd major version, competitors are begging for mercy. Life is good. Then Microsoft CRM 4 comes along with its' beastly architecture wanting plug-ins to be deployed in a database. And offline CRM clients, clutching a copy of Reflector all want your dazzling assembly as well.

Perhaps you simply wanted to avoid GAC, which Chris Sells knew to be evil back in 2004. Or may be you just felt that instead of being sucked into assembly hell you would rather distribute one and only one assembly.

Whatever the real reason might be, today's challenge is to write a Microsoft CRM 4 plug-in that uses classes and methods from other assemblies; then package it all into one blob that can be deployed and distributed as required. In fact, it was the challenge from one of our customers as well as from the newsgroups (speaking of good timing!). More...

Currently rated 4.5 by 6 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Filtering lookup data in CRM 4

Posted on February 16, 2008 04:11 by George Doubinski

Now we all know that when Microsoft says "unsupported" they always sometimes mean business. Take, for example, popular CRM 3 customisation to filter lookup field data that used to work well. Until version 4, that is. Not all is lost, however, because no thanks to me but to Adi Katz, now there is new unsupported way to make it work in CRM 4 as well.

For example, to make primary contact lookup for an account record to show contacts from this account only, the following customizations are required:

More...

Currently rated 4.5 by 54 people

  • Currently 4.481478/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Poor man mail merge

Posted on January 18, 2008 12:33 by George Doubinski

Some CRM projects are small and people, small business owners in particular,  are very cautious about the costs. In one of our CRM 3 projects, all the customer wanted was customised quote and order documents, nothing more nothing less. While installed templates are available for customisation, the most common complaint in the newsgroups is inability to add new attributes to the data. With GST legislation in place in Australia, we had to have additional attributes for the quotes and orders to look professional and be legitimate documents at the same time.

CRM 4 seems to resolve the issue, however, there is no simple alternative for CRM 3. If you need a full blown custom mail merge system, look no further than mscrm-addon.com WordMailMerge product. If you're already running Office 2007, Michael Höhne, the unofficial Microsoft CRM "da man", is offering soon-to-be-released document generator based on OpenXML format.

We could not help but wonder how come that Microsoft Excel could consume all possible permutations of filtered views while Microsoft Word remained confined to brain-damaged out-of-the box templates. The plan was simple: control Word through the javascript, create mail merge object, connect it to the data source, run some select statement based on filtered views then merge the data using a template. I knew there were some obstacles to overcome I just did not realise that there will be so many. More...

Currently rated 3.9 by 10 people

  • Currently 3.9/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5