Monthly Archives: January 2015

Interesting behaviours with enum in .NET

When defining an enum type, we can assign an int value to each of the enum members. Below is an example. Now there are two behaviours that you may not be aware of. Firstly, given the above definition, you can … Continue reading

Posted in .NET | 1 Comment

Form JavaScript returning incorrect saveMode in CRM – Microsoft bug?

I think I may have found a bug in the internal CRM JavaScript, and it is to do with retrieving the saveMode in form script. As you may be aware, you can determine the save mode by executing executionObject.getEventArgs().getSaveMode() in form … Continue reading

Posted in CRM | 1 Comment

Which ID property to use in early-binding programming in CRM?

Have you noticed that the generated early-binding classes always have 2 ID properties? For example, the Account class would have Id and AccountId. The Contact class would have Id and ContactId. Which property should you use in early-binding programming? Well, if … Continue reading

Posted in CRM | Leave a comment

Plugin/workflow attribute filtering and updating records via web service (the right way)

Recently we ran into an issue where a workflow configured to run upon changing a particular field was being triggered even though that field was not being updated. In the end it turned out that this was because of the … Continue reading

Posted in CRM | 1 Comment

How to update plugin/workflow assembly in CRM database programmatically

In certain scenarios you might need to update a plugin/workflow assembly deployed to the CRM database programmatically. A good example is for CI build/deployment purposes. From a CI build/deployment perspective, an issue with deploying the assembly to the database, and promoting the assembly … Continue reading

Posted in CRM | 1 Comment