I’m creating a report which is scoped to individual record level for Service Cases in Dynamics CRM 2011.
This report has 4 datasets; 1. Filter, 2. TicketDetails, 3. Materials and, 4. Labour.
The Filter dataset is there to grab the IncidentId of the current service case being viewed in CRM.
SELECT IncidentId FROM FilteredIncident AS CRMAF_FilteredIncident
I have a parameter called incidentfilter, it’s source is the Filter dataset. CRM seems to be ignoring the CRMAF_ prefix and just returning all service cases.
Datasets 2 and 4 are both have a where clause to filter on the incidentfilter parameter value. Dataset 3, queries GP, for that I pass in the TicketNumber field from the service case.
My report seems to be running, it’s just that it retrieves every service case from CRM.
I’ve had similar problem with CRM ignoring the CRMAF_Prefix. You can try this:
SELECT CRMAF_FilteredIncident.IncidentId FROM FilteredIncident AS CRMAF_FilteredIncident