web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How do I run additional code together with a Popout system-defined button

(0) ShareShare
ReportReport
Posted on by 10
My requirement is to run additional code when pressing the system button “Popout” on the right corner from a standard d365fo form(ex.SalesTable). What i need is to popout the window as the standard functionality did and then I want to show an info message. I would like to do this for many forms that’s why I want to do this more generic.
 
What I did until now is an extention of the FormRun class and overide the onFormRun method
[ExtensionOf(classStr(FormRun))]public final class FormRun_Test_Extension{[SubscribesTo(classStr(FormRun), staticDelegateStr(FormRun, onFormRun))]public static void onFormRun (FormRun _formInstance){GeneralEventHandlers::onFormRun(_formInstance);}}
class GeneralEventHandlers{static void onFormRun (FormRun _formRun){#SysSystemDefinedButtonsFormCommandButtonControl popoutButton;popoutButton = _formRun.control(_formRun.controlId(#SystemDefinedPopoutButton)) asFormCommandButtonControl;popoutButton.OnClicked += eventhandler(TestEventHandlers::Test);}public static void Test(FormControl sender, FormControlEventArgs e){info(“Test”)}}
I do not know if I am on the correct dirrection.
The problem is that the info message is not shown when I press the ‘Popout’ system button and the form appeared on the popout window.
I already already read system-defined-buttons article.
I appreciate any help!!! Thank you!!!
Categories:
  • Martin Dráb Profile Picture
    241,432 Most Valuable Professional on at
    For reference, we already started a discussion in another forum. The latest finding is that Test() method isn't executed at all.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 543 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 387 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 185

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans