Build a combined activity view in Dynamics CRM 4.0
- Sunday, December 28, 2008, 22:20
- Exam Topics
- 1,158 views
- 3 comments
Here’s how to get Fiddler worguide on the VPC:
1) Configure Fiddler to listen on port 8889. Then restart the app.
2) Rather than browsing localhost:5555 to load CRM, use this URL instead: http://moss.litwareinc.com:5555/loader.aspx. Fiddler cannot capture requests on localhost but can when the machine name is used instead.
After maguide those two adjustments you should be all set!
Thursday, July 17, 2008
Build a combined activity view in Dynamics CRM 4.0
Perhaps those capabilities will appear in 5.0 but in 4.0 you’ll have to build or buy a solution for this. One of my clients decided to have my team build this functionality and the screen below gives you a glimpse of what it turned-out like. Note that I had to gray-out some of the entries to protect private information.

Besides listing open and closed (History) activities in a single grid, we also built a preview pane to allow users to quickly view e-mail content and other activity details.
I’m not authorized to provide the source code for this solution but I can provide an overview of the solution in case you want to build something like this.
Application development: Visual Studio 2008 targeting .NET 3.0
ASPX overview: The ASPX page uses the standard ASP.NET GridView control. The middle section of the page includes a vertical resizing “control” (a table with a background image and linked JScript to provide sizing functionality). The preview pane consists of a textarea and iframe. The textarea is used to show non-HTML activity details (i.e., Tasks) and e-mail content is shown in the IFRAME.
Query: We debated whether to call the CRM Web Service to query for activities or whether it was better to use SQL (ADO.NET) via classes in System.Data.SqlClient. For performance reasons we decided to use SQL. The query consists of one query for each activity type combined with the SQL SELECT UNION clause. In the screenshot, you’ll see a combobox that allows activity type filtering. We pass that selection into a parameter into the SQL query.
Grid View Columns: The activity grid view contains the following columns: Activity Type, Created On, Subject, Description (e.g., a substring of the body of an e-mail), Source (e-mail sender), To (recipient(s)), Status, Owner, Created By, Modified By, Last Updated, Priority, and Resolution. Users can sort on any of those columns.
Other Features: We also provided the ability to export the grid to Excel and the ability to delete activities that are open/pending. That last feature was requested because the client turned off the ability to delete activities for all user roles but they wanted users to be able to delete open or pending activity, such as an e-mail that was drafted but not sent.
Donwload Free PassGuide Braindumps-The Most Realistic Practice Questions and Answers,Help You Pass any ExamsLastly, we deployed the solution as a virtual directory under the Microsoft Dynamics CRM 4.0 Web application. I know this is “unsupported” by Microsoft but the client had already built custom pages and placed them in a virtual under the CRM root so we went with their approach.
Let’s just hope that 5.0 includes lots of new UI capabilities to make this type of view possible. And drag-and-drop column reordering, colorized rows (based on business logic), and inline editing would also be great to have!
Upgrading Dynamics CRM 3.0 systems to 4.0 has kept me very busy lately. I’ve been involved with four upgrades in the past few months and have more on the horizon I’m sure.
On one of the upgrade projects, the client’s previous IT staff built-up the Account entity to include about 300 attributes. Now, I’m not one to quickly judge this as a bad idea without getting the facts and rationale for having so many custom attributes. Although I wouldn’t have designed the entity the same way (I would’ve used a few picklists to replace the 100+ bit fields) the current design was built, was worguide, and it wasn’t in the budget to change that part of the system.
But the question I had was this, “What percentage of each Account attribute has a value (is not null)?”. Knowing the answer to this, and knowing what types of clients, partners, suppliers, etc. were stored in the Account entity, might lead to some decisions on whether all of the attributes are really necessary or whether a particular company type might be best spun-off to a new entity.
At the bottom of this posting I provide the T-SQL script I put together to answer the “percentage of attribute utilization” question.
After running the script, I found one classification of companies that accounted for 80% of the 150,000 Account records. But that company type only stored data in 10% of the 300 attributes! In other words, there were approximately 35,000,000 fields in SQL Server with NULL values for those Account records!
Conversely, the other types of companies stored in the Account entity utilized 90% of all account attributes. So, most account attributes were being populated, but not for a very large percentage of account records.
The problem with having unpopulated attributes is not so much the unnecessary database overhead but the complexity of the Account form when users only need to fill-in 25 or so fields for one of the records types but need to populate up to 300 fields for other account types. That leads to a lot of confusion about what data is required in the UI. Building reports, too, becomes much more difficult with so many attributes.
Here’s the T-SQL script I created for this attribute utilization analysis. Again, this will help you determine what percentage of each attribute in the Account entity has a non-null value. Of course, you can tweak this code to analyze any other entity or even all entities and attributes!
set nocount on
declare @table varchar(255)
declare @col varchar(255)
declare @datatype varchar(255)
declare @sql varchar(1000)
declare @total_recs int
declare @total_non_null_recs int
declare cur cursor for
select table_name, column_name, data_type
from information_schema.columns
where table_name = ‘FilteredAccount’ — tweak this
order by [table_name], [ordinal_position]
open cur
fetch next from cur into @table, @col, @datatype
while (@@fetch_status > -1)
begin
set @sql = ‘declare @total_recs float; select @total_recs = count(*) from ‘ + @table + ‘;’
set @sql = @sql + ‘declare @total_non_null_recs float;’
set @sql = @sql + ‘select @total_non_null_recs = count(*) from ‘ + @table + ‘ where [' + @col + '] is not null;’
set @sql = @sql + ‘declare @percent_data_availability int;if @total_recs > 0 begin select @percent_data_availability = round((@total_non_null_recs / @total_recs) * 100, 0) end else begin select @percent_data_availability = 0 end;’
set @sql = @sql + ‘print ‘ + ”” + @table + ‘,’ + @col + ‘,’ + ”” + ‘ + convert(varchar(10),@percent_data_availability)’
execute (@sql)
fetch next from cur into @table, @col, @datatype
end
close cur
deallocate cur
The output of this script appears, in SQL Server Management Studio, on the Messages tab in the query results area of the query window.
The ouput includes the table name, attribute name, and an integer representing the percentage of records where the attribute has a non-null value. For example, the output below means that 78% of the address1_city attributes in all records in the FilteredAccount view has a value:
FilteredAccount,address1_city,78
In conclusion, you can use this script or something like it to quickly determine which entities and attributes in your CRM system has a value. If you see a low percentage for an attribute that you think should be much higher then that will likely lead you to take action, such as requiring values in the UI or perhaps removing the attribute altogether.
PassGuide Cisco Exams Questions & Training Materials
- Free AVAILABLE: Microsoft Dynamics CRM 4.0 RTM VPC
- Free Passguide microsoft Crm 3.0 mb2-423 exam
- Free Dynamics CRM 4.0 Quick Reference
- Free passguide HP ASE HP0-780
- Free Passguide Oracle 9i DBA Exam 1z0-007
- Free passguide Microsoft Business Solutions Exam MB2-632 v2.83
- Free passguide HP0-780
- Free passguide HP0-336
- Free MCAD MCSD Certification Training SQL 70-229 Exam
- Free Deploying Microsoft Dynamics CRM 3.0
- Free sun SCBCD Exam Objectives
- Free passguide HP0-311
About the Author
3 Comments on “Build a combined activity view in Dynamics CRM 4.0”
Write a Comment
Gravatars are small images that can show your personality. You can get your gravatar for free today!


I follow your posts for quite a long time and should tell you that your posts are always valuable to readers.
http://www.assembla.com/wiki/show/susaninas/ritalin_vs_strattera ritalin vs strattera | ritalin vs strattera
http://www.assembla.com/wiki/show/susaninas/samples_of_actonel samples of actonel | samples of actonel
http://www.assembla.com/wiki/show/susaninas/singulair_stomach_discomfort singulair stomach discomfort | singulair stomach discomfort
http://www.assembla.com/wiki/show/susaninas/ephedrine_and_hypertension ephedrine and hypertension | ephedrine and hypertension
http://www.assembla.com/wiki/show/susaninas/ephedrine_drug_with_drawals ephedrine drug with drawals | ephedrine drug with drawals
http://www.assembla.com/wiki/show/susaninas/simvastatin_printed_on_pill simvastatin printed on pill | simvastatin printed on pill
http://www.assembla.com/wiki/show/susaninas/orlistat_and_septic orlistat and septic | orlistat and septic
http://www.assembla.com/wiki/show/susaninas/kentucky_avandia_attorneys kentucky avandia attorneys | kentucky avandia attorneys
http://www.assembla.com/wiki/show/susaninas/equivalent_medication_to_namenda_medication equivalent medication to namenda medication | equivalent medication to namenda medication
http://www.assembla.com/wiki/show/susaninas/long_term_use_of_cialis long term use of cialis | long term use of cialis
http://www.assembla.com/wiki/show/susaninas/walgreens_diet_pills_with_ephedra walgreens diet pills with ephedra | walgreens diet pills with ephedra
http://www.assembla.com/wiki/show/susaninas/fenugreek_and_reglan_together fenugreek and reglan together | fenugreek and reglan together
http://www.assembla.com/wiki/show/susaninas/anti_naseau_reglan anti naseau reglan | anti naseau reglan
http://www.assembla.com/wiki/show/susaninas/diclofenac_phosphate diclofenac phosphate | diclofenac phosphate
http://www.assembla.com/wiki/show/susaninas/claritin_d_sudafed claritin d sudafed | claritin d sudafed
http://www.assembla.com/wiki/show/susaninas/line_omeprazole_omeprazole_pharmacy_prilosec line omeprazole omeprazole pharmacy prilosec | line omeprazole omeprazole pharmacy prilosec
http://www.assembla.com/wiki/show/susaninas/singulair_and_suicide singulair and suicide | singulair and suicide
http://www.assembla.com/wiki/show/susaninas/prevacid_condylox_nexium_propecia prevacid condylox nexium propecia | prevacid condylox nexium propecia
http://www.assembla.com/wiki/show/susaninas/omeprazole_litigation omeprazole litigation | omeprazole litigation
http://www.assembla.com/wiki/show/susaninas/1831_celebrex_heart_attack_2638 1831 celebrex heart attack 2638 | 1831 celebrex heart attack 2638
http://www.assembla.com/wiki/show/susaninas/simvastatin_when_to_take simvastatin when to take | simvastatin when to take
http://www.assembla.com/wiki/show/susaninas/excessive_vaginal_bleeding_after_taguide_provera excessive vaginal bleeding after taguide provera | excessive vaginal bleeding after taguide provera
http://www.assembla.com/wiki/show/susaninas/one_dose_diflucan one dose diflucan | one dose diflucan
http://www.assembla.com/wiki/show/susaninas/niaspan_elevated_liver_function niaspan elevated liver function | niaspan elevated liver function
http://www.assembla.com/wiki/show/susaninas/namenda namenda | namenda
http://www.assembla.com/wiki/show/susaninas/mixing_zoloft_and_ritalin_or_strattera mixing zoloft and ritalin or strattera | mixing zoloft and ritalin or strattera
http://www.assembla.com/wiki/show/susaninas/using_diazepam_with_citalopram using diazepam with citalopram | using diazepam with citalopram
http://www.assembla.com/wiki/show/susaninas/pictures_of_skin_rash_from_diflucan pictures of skin rash from diflucan | pictures of skin rash from diflucan
http://www.assembla.com/wiki/show/susaninas/side_effects_simvastatin side effects simvastatin | side effects simvastatin
http://www.assembla.com/wiki/show/susaninas/penicillin_wounder_drug penicillin wounder drug | penicillin wounder drug
http://my.telegraph.co.uk/6u314fi2t21 6u314fi2t21 | 6u314fi2t21
http://mipagina.univision.com/glyccomhotosnie1980 glyccomhotosnie1980 | glyccomhotosnie1980
http://www.pyzam.com/profile/3362682 enukacto1981 | enukacto1981
http://mipagina.univision.com/fimysdovecong1989 fimysdovecong1989 | fimysdovecong1989
http://www.pyzam.com/profile/3362690 produlsnakin1980 | produlsnakin1980
http://mipagina.univision.com/caicarvilera1981 caicarvilera1981 | caicarvilera1981
http://mipagina.univision.com/alvicohurup1985 alvicohurup1985 | alvicohurup1985
http://mipagina.univision.com/traminirovac1982 traminirovac1982 | traminirovac1982
http://mipagina.univision.com/mulzoodikealou1989 mulzoodikealou1989 | mulzoodikealou1989