Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Hide and Show or Enable and Disable Pre-filtered CRM Report in Run selected record Form/List Area

Posted on by 44,522

Hi,

Is there anyone knows is it possible to hide/show or enable/disable CRM Report selector in the Form/List area of an entity record based on the form field value?

I have requirement (actually nice to have) to make the CRM report selector as contextual based on the field value:

In the picture, I want to only show Outright Sales report (hide the Installment report), if the Quote Type = Outright Sales.

I don't want to use IFrame to make it dynamic by setting the URL since the User is more comfortable to use the Run Report function according to them.

Thank you in advance, everyone.

  • Aileen Gusni Profile Picture
    Aileen Gusni 44,522 on at
    RE: Hide and Show or Enable and Disable Pre-filtered CRM Report in Run selected record Form/List Area

    Hi Scott,

    Thank you so much for your help.

    As per my expectation before, I also had read your useful post and though to build that dynamically. Or create ribbon one by one..

    jlattimer.blogspot.com/.../running-report-from-ribbon-button.html

    Have you tried to take a look deeper into this function: Mscrm.ReportsMenu.Populate.Form

    It will return the string XML? And will get the report ID or report name?

    But, it is not supported to use this internal built-in CRM function, right? And I cannot get the function script?

    Thanks for confirming.

    Next, I will try to combine the dynamic query command building:

    develop1.net/.../Add-Dynamic-Menu-to-Ribbon-Button.aspx

    plus Jason's link and can learn using the SparkleXRM as helper class.

    Thank you Scott.

  • Suggested answer
    ScottDurow Profile Picture
    ScottDurow 50,177 on at
    RE: Hide and Show or Enable and Disable Pre-filtered CRM Report in Run selected record Form/List Area

    Hi Aileen,

    The flyout is dynamically built and so you can't hide/disable individual report items using standard value rules.

    You'll need to create a dynamic flyout that queries the available reports based on the form value and then constructs the flyout menu xml.

    The built in command for building the report menu could be used (Mscrm.ReportsMenu.Populate.Form) but you would need to wrap it up in your own function and then filter the xml it returns - so it's much easier (and supported) to create your own xml as I describe in develop1.net/.../Add-Dynamic-Menu-to-Ribbon-Button.aspx

    If you are interested, SparkleXRM has some helper classes that allows you to do this - github.com/.../Ribbon

    Example here - github.com/.../Global.cs

    Hope this helps!

    Scott

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans