Instant Tax, Just Add a CRM 2011 Plugin

October 1st is the day here in New Zealand where the G.S.T (Goods and Services Tax) will change from 12.5% to 15%. If you're using Dynamics CRM 4 or are about to implement CRM 2011 then this is a good opportunity for you to future proof your system.

We've seen many implementations of Dynamics CRM using javascript to calculate tax, just today I got a call asking if I could help change the tax because their implementation partner said it would take four weeks to even look into it! Not cool

Once the solution is imported into CRM 2011 you'll see Tax Rules on the left hand side under settings. The add-on allows you to define multiple tax rules, for example, different tax rates can be applied to foreign currencies or a global tax rule can be specified to apply across the entity of your choice, including custom entities.

It also has the ability to turn off the automatic tax calulation for specific records, this is done via the 'Apply Tax Field', when you specify a Bit/Boolean field schema name the plugin will check to see if that field has been set and apply tax accordingly.

The above screenshot shows the tax rules engine configured for invoices, since each line item contains tax, we specify invoicedetail as the entity.


Tax Rules in action

SDK changes I've noticed while porting this from CRM 4 to CRM 2011

  • Enumeration classes like Microsoft.Crm.Sdk.MessageName, ParameterName are not available
  • IPluginExecutionContext.Depth is equal to 2 when the plugin is executed in the Update message
  • CrmMoney is now Money, was expecting decimal since most other crm data types are native .net types
  • To get all the columns use new ColumnSet(true) instead of new AllColumns()
  • Input/OutputParameters of IPluginExecutionContext is now typeof ParameterCollection instead of PropertyBag

Contact me via www.magnetism.co.nz if you'd like to try this plugin, it's available for CRM 4 and CRM 2011 Beta.

1 Comment

Comments have been disabled for this content.