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, ...
Suggested Answer

Initializing form event is not triggered

(1) ShareShare
ReportReport
Posted on by 12
Hello,
 
I created a form extansion in order to add list panel to SrmParameters form.
The panel is initialised in Initializing event:
 
[FormEventHandler(formStr(srmParameters), FormEventType::Initializing)]
    public static void srmParameters_OnInitializing(xFormRun sender, FormEventArgs e)
    {
        FormRun            formRun = sender;
 
        TestListPanel  listPanel = TestListPanel::newForm(sender,
                sender.controlId(formControlStr(srmParameters, TestControl))); // parent control
 
        formRun.setlistPanel(listPanel);
    }
 
The problem is: after I build the project list panel is shown on the form and everything looks fine. But after I build the model, the panel is not shown and event handler method is not triggered. Any ideas why it's not triggered?
  • Suggested answer
    Waed Ayyad Profile Picture
    9,218 Super User 2026 Season 2 on at
    Hi,
     
    Did you try to debug the code and see if the debugger hit the code or not?
     
     
    Thanks,
    Waed Ayyad
     
  • Layan Jwei Profile Picture
    8,301 Super User 2026 Season 2 on at
    Hi,

    Yes did you debug after model build and see if the code is being called? 

    Also see if this link can help out
    https://community.dynamics.com/forums/thread/details/?threadid=cd78dd2f-3a6f-4374-a9b9-2b2f7c23e541
  • SS-21081532-0 Profile Picture
    12 on at
    Hi guys,
     
    Yes, I tried debugging it after model build. Event handler method is not hit.
  • Suggested answer
    Waed Ayyad Profile Picture
    9,218 Super User 2026 Season 2 on at
    Hi,
     
    Try to use COC instead of the event handler.
      [ExtensionOf(formstr(srmParameters))]
        final class CustTableForm_Extension
        {
            public void init()
            {
                FormRun formRun = this as  FormRun;
    
                  TestListPanel  listPanel = TestListPanel::newForm(sender,
                    sender.controlId(formControlStr(srmParameters, TestControl))); // parent control
     
                 formRun.setlistPanel(listPanel);;
    
                next init();
               
            }
        }

     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Waed Ayyad Profile Picture
    9,218 Super User 2026 Season 2 on at
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad

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 495 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
CU10121822-0 Profile Picture

CU10121822-0 366

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans