Topic: ‘Development’

 
 

Limitations Surrounding Fetch XML and Microsoft Dynamics CRM 2011 Online

By in Advanced Find, CRM 2011, CRM Online, Development, Dynamics CRM, Reports on Friday, November 18th, 2011

Fetch XML has a few limitations still which will quickly surface as you start building reports. You need to be aware of these:

  • You cannot specify left outer joins – e.g. The following is not supported: “Select all Accounts who do not have a related Completed Appointment record”
  • You cannot specify group by/sum queries – e.g. The following is not supported: “Select Account Name, count(*), sum(est. value) from Account Group By Account Name” – You can only select the records in detail and then perform the aggregation in your report. But…
  • Fetch XML queries return a maximum of 5000 records. Read the rest of this entry »
 

Using SSRS 2008 R2 to Export Dynamics CRM Data to Microsoft Excel with Multiple Tabs

By in Business Intelligence CRM, Development, Dynamics CRM, Excel 2007, Reports, SQL Server, SSRS Reports on Friday, October 21st, 2011

For simple exports to Microsoft Excel, you can use the Advanced Find functionality to find the records, and then export. But keep in mind that you can only get one data set per Excel file. What about when the requirement is to export data from CRM to a multiple-tabbed Excel file where each tab is a different data set? Read the rest of this entry »

 

Workflow or Plugin for Creating or Updating Dynamics CRM Data

By in Development, Dynamics CRM, Workflow on Friday, July 15th, 2011

When implementing CRM, it is not unusual for a request to surface that requires datat creation based upon a certain action.  Usually it is something like “create an Activity record” or “update another entity based upon a change in a record.”  Plugins, and sometimes workflows, can both handle this situation. 

Workflows are a basic and simple way to go. However there is a limitation – workflows cannot update multiple related records (e.g. child records of a parent record).  Plugins on the other hand are fully capable of getting the job done. When you are in a situation where either functionality can handle the job, a question surfaces: “Which one do you use?”  Read the rest of this entry »

 

Dubunking the DeletionStateCode in Dynamics CRM 2011

By in CRM 2011, Customization, Data, Development, Dynamics CRM, SQL Server on Friday, July 1st, 2011

There is a big change in CRM 2011 that isn’t really talked about much, but it has an impact in some key areas. In CRM 4.0 there was a column in the database tables for each entity to tell you when a record was deleted or not – DeletionStateCode.* It had the following possible values: 0 meaning the record was active in the database, 2 meaning the record was marked for removal when the deletion service next runs, and 1 which was not used. On a schedule the deletion service would skim through the tables and remove all the records with a value of 2.  Fortunately or unfortunately (depending on how you look at it), the deletion service had problems and often didn’t run or would leave records in the system. When developing against the CRM environment (i.e. any custom SSRS reports, SQL queries, custom web pages, or plugins), you would need to take into account records with ‘deletionstatecode = 2’ (either excluding/including them based on what you were trying to do). There was an upside however; the inclusion/exclusion made it easy to be able to go back and look for missing records that may have been deleted accidentally and recover them or determine who had deleted them.

In CRM 2011, ‘DeletionStateCode’ no longer exists. When you delete a record, it goes bye-bye for good. There is no trace of it left behind. This means that you do not have to include it in your customizations against CRM anymore. If you want to be able to go back and retrieve old records you will need to do a restore to a backed up version of the database.  If you want to see who deleted what, you will need to use some type of audit logging.**

How does this affect your system? If you are new to Dynamics CRM 2011, it has no impact, but if you are upgrading…this means you may have some work to do. If you have customized your system beyond simple configuration and reference DeletionStateCode in your custom code, reports, or queries, you will need to go and remove those references to prevent errors from rendering your customized system useless. Additionally this is very important when planning for your upgrade from CRM 4.0 to CRM 2011. Make sure that you run the deletion service manually prior to upgrading and also check that all records with a DeletionStateCode = 2 that the service might have missed get removed from the system as well. If there are any records remaining in the database when the system gets upgraded, they will magically reappear as active records when you log into CRM 2011! While it might be a little tedious, it is not a difficult change process if you know ahead of time what to expect.

*Microsoft will tell you that it was unsupported to reference the DeletionStateCode if you ask them to assist in fixing any problems you may encounter in regards to this field. Catch 22 – you had to reference it while customizing 4.0 because the deletion service never worked and your data would be incorrect. Good news is, you don’t need to worry about it anymore because they removed the process - but your upgraded customizations will have to be modified.

**CRM 2011 has auditing functionality built in natively.

 

Technical Information on Dynamics CRM 2011

By in Best Practices, Business Intelligence CRM, CRM 2011, Development, Documentation, Dynamics CRM, Performance, SDK, Whitepaper on Wednesday, June 29th, 2011

Want to know more about Dynamics CRM 2011 on a technical level? Want to download and peruse the 2011 SDK? Want to view some tecnical articles specifically geared towards Dynamics CRM 2011?

Microsoft TechNet has a library with technical information that is very helpful for any technical consultant working with Dynamics CRM 2011. Click here to navigate to the Microsoft Dynamics CRM 2011 section of the TechNet library.

 

Dynamics CRM: Using Workflow Plugin to Send Email to Address Only

By in Development, Dynamics CRM on Monday, January 24th, 2011

Out of the Box Workflow functionality is great to send emails to a contact or user, but it does not give the ability to send an email to an email address that is a custom field.  I was able to accomplish this by using a Workflow Plugin to send the email.   Read the rest of this entry »

 

View State & Microsoft Dynamics CRM Custom Webpages

By in Development, Dynamics CRM on Wednesday, December 22nd, 2010

When you create a custom webpage for Microsoft CRM, sometimes that webpage will contain a control that uses view state to enable server side access.  Everything will work fine in the development environment, but it will not work if you set up the application to use the CRMAppPool App Pool.

 Microsoft CRM does not use view states, so in order to enable view state and get it to work you will need to use a different App Pool than CRMAppPool and you will need to explicitly but enableviewstate=”true” in the declaration line of your .aspx page.