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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Pre event handler code form form control clicked method.

(0) ShareShare
ReportReport
Posted on by 35
Hi everyone,
 
I tried with onclick event handler code but it is working after clicked method. I want to run my logic before clicked method. For this I need to write pre event handler code or any. Please help me with this query.
What code I need to write.
Req: I want display one yes/no dialogue box based on some condition if I click yes it should go for next process. Else I click no it should stay in same form only. I tried clicked method COC but It is going to forward if I clicked no also. Onclick Event handler code is working after clicked method
 
Thank you...
 
I have the same question (0)
  • Suggested answer
    Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi Community User,
     
    Can you please share your code with us. And  what did you try exactly that didn't work?
     
    In general, you can use chain of command and put your logic before the next if you want the code to get called before.
     
    [ExtensionOf(formControlStr(Table1, Button1))]
    final class Table1_Button1_Extension
    {
          public void clicked()
          {
                 // logic here
                     next clicked();
          }
    }
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future. You can do this by ticking the box "Does this answer your question"

  • Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi Community User,

    I can see you amended your question after I posted my reply, that you tried coc and  you added more details regarding dialog. Please share with us the code. And what is the business you are trying to achieve? Also what form are you trying to amend?
     
    Thanks,
    Layan Jweihan

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans