ISV.Config.xml Entries

Unusual ISV.Config.xml behaviour.

 
Recently one of our clients had mentioned that a small piece of their Microsoft CRM 3.0 functionality was not functioning correctly, namely a customised button. To make it easier for certain CRM users to create new Products in the Product Catalog I had added a new Grid button to the Products entity.
 
crm1
 
This displayed a blank Product form ready to create new entries and meant that they did not have to navigate to the Product Catalog section in the Settings area. This was particuarly useful as the Product Catalog cannot be accessed from within the Outlook client since the settings area is not exposed to the Outlook client. The button was placed on the grid by editing the ISV.Config.xml and adding the following entry;
 
   <Entity name="product" >
   <Grid>
    <MenuBar>
         <Buttons>
      <Button Title="New" ToolTip="Create a new Product" Icon="/_imgs/ico_18_1024.gif" Url="http://crmserver/products/product/edit.aspx" PassParams="1" WinParams="height=550,width=1000,Top=200,Left=200,Toolbar=0,Resizable=1,Status=1" WinMode="0" AvailableOffline="true" />  
     </Buttons>
    </MenuBar>
   </Grid> 
  </Entity>
 
I had tested this button in test environment before transfering the code to the clients server and everything worked fine. That was until the other day when a number of users recieved a new machine with a fresh install of the CRM. The install went smoothly as I had made sure they had uninstalled the Outlook client from their old machines before installing it onto the new ones. When they clicked on the ‘New’ Product button to open up the form there was no option to Save or Save and Close.
 

crm2

 
I knew nothing had changed on the server, so I checked the settings for the Intranet Zone to see if they were configured correctly or were causing the problem but they were all fine. After more head scratching and web surfing I decided to try something and removed the Sales Manager Role from one of the users who had this issue. (The Sales Manager has permissions to create Products). They only had one Role so I just added the Sales Manager Role back to the user and got them to try the button again. This time it worked and the user had the ability to save changes to the new product.
 
So although nothing had changed within the system, for some reason the CRM Server needed its security roles refreshing to allow the user to operate with functionality defined within the ISV.Config.xml file.

Error trying to view reports in Microsoft CRM 3.0

Reports.config has invalid schema, and could not be loaded.
 
It seems that a client’s server that had recently had an update applied to it (by someone else Smile) had caused some of the configuration settings to be changed on my Microsoft CRM website. Although my CRM system was operational there were two significant issues that required investigation;
  • Warning notifications were appearing in the application event log of the server for the Microsoft CRM web application. For some reason it was throwing unhandled exception errors for an event source of ASP.NET 2.0.50727.0 – this was my first clue to the problem.
  • When I tried to view the reports available within Microsoft CRM through the browser I was presented with an error dialog containing Reports.config has invalid schema, and could not be loaded.

After some research and comparison to my test server it soon became obvious that my CRM website had changed its ASP.NET settings from 1.1.4322 to 2.0.50727.0. To restore it to its original settings I ran the following commands from the command line;

  1. C:WINDOWSMicrosoft.NETFrameworkv2.0.50727aspnet_regiis -k w3svc/5/root
  2. C:WINDOWSMicrosoft.NETFrameworkv1.1.4322aspnet_regiis -s w3svc/5/root
  3. Perform an IIS reset.

The first command line removes the script maps to all versions of ASP.NET from all ASP.NET applications at the specified application root path and its subdirectories. The second command installs the script maps pointing to the ASP.NET ISAPI version, in this case v.1.1.4322, at the specified application path root and its subdirectories.

This solution stopped my unhandled exceptions from being generated in the event log and allowed me to view my reports within CRM again.

A couple of FYI’s for this process;

 

CRM Custom Attributes

‘Wrong value type is passed to the control…’ for CRM 3.0 Custom Attribute
 
Microsoft Dynamics CRM 3.0 is one of those applications that is amazing in its flexibility and power but can be frustrating when you are challenged by unexpected issues. Whilst working on some custom attributes for a  CRM form today I started to get error being raised when I was saving information to one of these custom attributes. After a little surfing I found that other people had come accross this problem and it seems to stem from reusing a schema name for custom attributes.
 
For example;
  • create a custom attribute with a schema name of new_fieldname and assign it a field type of nvarchar.
  • add the new attribute to a form and publish the form.
  • remove the field from the form and then delete the attribute from the list of attributes.
  • create a second custom attribute with the same schema name but assign it a different field type e.g. float.
  • add the custom attribute back onto the same form and publish the form.
  • When you try to save data to the form you get the ‘Wrong value type is passed to the control…’ error.

The solution, or the one that I have found to work for me, is to make sure that after you delete the original custom attribute from the form you publish the form before you create the second attribute with the same name but different type. This allows CRM to completely remove any references to the original custom attribute.