When registering steps for plugins, you are given the option to select the user the plugin should run as. Your options are bascially calling user or any CRM system user for the organisation you are registering the plugin for. By running the plugin in the context of a user you take onboard that users privilages. For example, if you registered a plugin that creates an account within the context of calling user, and my user triggers the plugin, an account will be created in my name. However if my user doesn’t have permissions to create an account, but we need it to create an account on this trigger we have a slight problem. The plugin will fail creating the account! We can’t change my security roles to allow the creation of accounts as I should not be able to do this. So our only option is to run the plugin in the context of a user that can create accounts. So lets say we have an Administrator user that we will run in the context of. Well now we have introduced the problem that I actually want to talk about!
Today I discovered a gotcha with the XML placement for ribbon changes in the customisation XML. The gotcha surfaced while I was using the Visual Ribbon Editor tool. The main reason the gotcha rose was while using the tool I don’t have to pay attention to what parts of the XML are being edited, unlike if I was doing it manually.
With new exciting CRM development mythologies and technologies to learn and master it’s easy to get carried away and forget the basics. You can spend ages on a small issue, think up a whole host of whacky potential reasons for the error, and then finally decide to start with the basics to which you end up kicking yourself for your silly mistake.
What am I talking about? Recently I tried to export a solution from one system in to another. The import kept failing with an error about invalid XML. Read more about Issues Importing and Exporting solution files between CRM Systems …