We’re gonna get a bit technical today.
In Microsoft Dynamics CRM, one of the reasons for turning on pre-filtering for custom reporting is to associate the report with the open form (record) so that it picks up the unique identifier of the opened record and passes it to the report. So, when the report is run, it filters records and only displays information about the opened record.
The following is the FetchXML report definition code snippet for turning on pre-filtering (for entity Cases- a.k.a. incident):
<entity name=”incident” enableprefiltering=”true” prefilterparametername=”FilteredIncident”>
When running a custom report, if you are getting following message that prevents the report being rendered- follow the instructions below.
It can take you some time to figure out the issue like this.
As per the message above, the pre-filtering tried to use the primary key field of the entity to pull the record. But the field – in this case incidentid was not found because it was not searchable. Pre-filtering uses the advice find to look for the record. In this case, the incidentid was not searchable and pre-filtering did not find that field and hence the error.
Make the field searchable by going to Settings->Customizations->Customize the system->Cases (primary entity the report is for) and open the field and make it searchable and publish customizations.
Everything should work as expected!
Hope this will save some time if you are experiencing the above issue. If you have any custom reporting needs or issues please reach out to our CRM team at PowerObjects.