Posts

CRM 2011 Plugins: Welcome to transactions !

One of the thing I hate about CRM 4.0 plugins is the inability to automatically rollback actions when an exception occurs during a business process. To illustrate this, imagine a plugin which creates a contract, then a line of contract. If the code throws an exception during the creation of the contract line, you need to take care yourself of deleting the contract that have been created: of course, you need the contract AND the contract line, not just the contract. In CRM 2011, you can now register your plugin in new stage (see below). That means that you can register your plugin in a transaction (if using stage 20 and 40) and whenever you plugin throws an exception, every action done during the transaction will be rollback. In our previous example, that means tha the contract will be deleted automatically by the application. Event Stage Name Stage Number Description Pre-Event Pre-validation 10 Stage in the pipeline for plug-ins that are to execute before the main system...

Tools Update: IsvConfigManager and FormJavaScriptManager

Image
That will surely be the last update for these tools (unless you discover a bug ). Isv Config Manager changelog: Remove publishing feature (Isv.config doesn’t require publish) You can now add button without Title element Add Expand/Collapse feature Add Read/Write Xml feature : You can now see what is the corresponding Xml for a treeview element. You can also add a treeview element by pasting xml content. See the capture of these new features : Form JavaScript Manager changelog: Ability to load script files from a directory AND all its sub directories When opening again the folder browser, it starts from the current selected folder As usual, you can download these new versions using the right hand pane of this blog. EDIT: I didn’t let you the time to discover a small bug when inserting xml content into a treeview element, so don’t ask me, just download the tools again…

Advanced Find Search: Where is this damn N:N relationship???

Image
Did you ever have this feeling that something should behave in a way and you can’t figure out why this does not…? I faced this feeling recently regarding the advanced find search. Here is the scenario: I created a N:N relationship between the account entity and a custom entity called Technology. As this relationship was just a “technical” one, I decided to hide left hand menu for this relationship. Below screenshots were taken for entity “test”. “Ne pas afficher” means “Do not display” When I then needed to perform an advanced find search on account related to a specific technology, I wasn’t able to select the N:N relationship in the list of relationships. I even thought that it was perhaps a normal behavior for N:N relationships (yeah, I know, that”s dumb, but I do not required N:N relationship for queries so often). We can’t see “test” entity Well, in fact, the solution was pretty simple, even if this is not mentioned anywhere: You have to keep the left hand menu of the relati...

CRM 4.0: Overriding lookup onclick

Image
For one of my customer, I faced a difficulty. I wanted to override the lookup onclick event to provide my own lookup selection that uses a treeview (see below picture) which is much mor euser friendly when we talk about self related entities. The problem : the behavior of the lookup is controled by a .htc file. It is a bad idea to change this kind of file (unsupported) and you can’t just remove the link to this file in the css class because you will loose all behaviors, not just onclick one. The only way I found was to create a new lookup image with its own behavior, hide the original one, and add the new image next to the original one. All this using javascript. It is also unsupported but you are sure that your javascript won’t be override during rollup installation or other kind of CRM updates. Here is the javascript: 1: var lookupAttribute = "new_categoryid" ; 2:   3: crmForm.performNewClick = function () 4: { 5: // Put here your alternative...

20.000 visits!

Hi all, Just a big thank you to be so many to visit my blog! You were a little more that 20.000 in a little less that 2 years… I hope I will be able to make still more people visiting this blog, even if I don’t have lot of time these days to write here. See you on this blog, Dynamics CRM forums or anywhere else !

Tool Update : ISV Config Manager

Just a small update regarding the attribute AvailableOffline that used incorrect value and makes the forms crash. The tool has been updated and can be downloaded in the same place as before.

Tool update: Form Javascript Manager

Today, a small update on this tool. Scott Sewell told me that some characters were not escaped correctly when exporting scripts from the CRM server. It is true but as you might know I’m French so I work mainly with French environments and this problem was not showing on French CRM servers… Anyway, the bug is corrected and you can download the latest version, as usual, on the right pane of this blog.