Make a Report Context-Sensitive

banner art

The following steps describe how to set up a context-sensitive report in Microsoft CRM.

  1. Create a report that contains fields from a Filtered<entity> database view and establish one or more SQL JOINs with other related filtered views as required.
  2. Use CRMAF_Filtered<entity> as an alias name in the report's SQL query statement. For example:
    SELECT CRMAF_FilteredActivityPointer.activitytypecodename as
    CRMAF_FilteredActivityPointer.regardingobjectidname as regardingobjectidname,
    CRMAF_FilteredActivityPointer.subject as subject,
    FROM FilteredActivityPointer AS CRMAF_FilteredActivityPointer
    INNER JOIN FilteredAccount As CRMAF_FilteredAccount on
    CRMAF_FilteredAccount.accountid = 
  3. When you upload the report to Microsoft CRM through the Report: New form, select all entities in the Related Record Types categorization whose filtered views are referred to in the report's SQL code.
  4. In the Display in field of the form, Forms for related record types must be one of the selected values.

For example, if a report displays all activities for a particular account and you would like to show this report on the Microsoft CRM Account form, you must include Activities and Accounts in the Related Record Types categorization and specify Forms for related record types in the Display in field of the Report: New form.

© 2007 Microsoft Corporation. All rights reserved.