Build a combined activity view in Dynamics CRM 4.0

After loading Fiddler for the first time on the CRM 4.0 VPC, you’ll likely see an error on startup. Fiddler indicates that it cannot listen on port 8888.

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

I’m often asked whether it’s possible in 4.0 to view all activity related to an entity, regardless of whether the activity item has been sent, completed, or closed? Another common question is whether it’s possible to view the sender and recipient(s) of an e-mail in a CRM grid view.

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 Exams

Lastly, 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

  1. Free AVAILABLE: Microsoft Dynamics CRM 4.0 RTM VPC
  2. Free Passguide microsoft Crm 3.0 mb2-423 exam
  3. Free Dynamics CRM 4.0 Quick Reference
  4. Free passguide HP ASE HP0-780
  5. Free Passguide Oracle 9i DBA Exam 1z0-007
  6. Free passguide Microsoft Business Solutions Exam MB2-632 v2.83
  7. Free passguide HP0-780
  8. Free passguide HP0-336
  9. Free MCAD MCSD Certification Training SQL 70-229 Exam
  10. Free Deploying Microsoft Dynamics CRM 3.0
  11. Free sun SCBCD Exam Objectives
  12. Free passguide HP0-311

About the Author

PassGuide Free Certification Exam Download has written 11070 stories on this site.

If you have any doubts about legality of content or you have another suspicions, feel free to contact us:CertGuard@Gmail.com

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!

Copyright © 2012 CertBible – IT certifications Exams,Study Guide,Practice Test,Training Materials.. PassGuide,Testinside,Pass4side,Certifyme,Transcender,Examworx,Topcerts,Actualtests. Cisco microsoft Comptia CCNA CCIE MCSE Oracle ccnp hp ibm citrix Sitemap