Wednesday, May 23, 2012

Report not showing under "Run on Current Record"

This has happened to me on a number of occassions. I modify an existing report making sure it adheres to all the CRM SDK reporting standards and in the report definition I make sure to specify that he appropriate entity/entities are entered in the "Related Record Types" and that the "Display In" is set to "Forms for related record types" and/or "Lists for related record types".

Yet when I open up the entity form (in the example above this would be a Marketing List record), the report appears under the "Run on All Records" section rather than under the "Run on Current Record". While this would be ok had the report not been linked using the context-sensitive "CRMAF" nomenclature - in this case, the report has been written such that it should be context-sensitive. So why does it show in the wrong section?

The behavior that I've observed is that if the report is created initially such that it does not adhere to context-sensitivity, it will rightly appear under the "Run on All Records" section. Later on, if you modify the report definition to include context-sensitivity it will still remain in this section.

If that is the case simply deleting and recreating the report will resolve this issue. At least that's been my experience.


  1. Nahi,

    Thanks VERY much for your posting. I've been tearing my hair out with this for the last day. I knew that I had made the appropriate modifications to my report, but it wasn't actually doing the filtering until I deleted and recreated it.


  2. You're welcome. Glad it came in handy.

  3. Thanks. We had a similar problem. With us the magical CRMAF_ was not the reason, but the tables were square bracket indicated.
    Example: Select * From [FilteredAccount] as CRMAF_FilteredAccount
    Square brackets prevent using the restriction.

    1. Hi! You mean that The tables should NOT have brackets?

  4. Heaven! Why does MicroShit never publish such helpful stuff?! It whould have saved me hours!