This allows you to:
- Run a report on just the record you are in from the entity form
- Run the report from a view on just the records in the view or just selected records within that view
- Run Advanced Find style filtering on your report if just ran from the reports section.
There are two steps:
1. You need to modify your query to include a specific prefixed alias. This signals CRM to pass in the context of the records and filtering to apply by parsing in a subquery.
An example query without pre-filtering:
SELECT accountid, name FROM FilteredAccount
The same query with pre-filtering enabled:
SELECT accountid, name FROM FilteredAccount AS CRMAF_FilteredAccount
So that's all you need to do at the report level to enable pre-filtering
2. When uploading the report, you need to choose the "Related Record Types" and add Forms for related record types, lists for related record types to the "Display In" section.
-I hope this helps!