Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Pre event handler code form form control clicked method.

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...
 
  • Layan Jwei Profile Picture
    Layan Jwei 7,316 Super User 2024 Season 2 on at
    Pre event handler code form form control clicked method.
    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
  • Suggested answer
    Layan Jwei Profile Picture
    Layan Jwei 7,316 Super User 2024 Season 2 on at
    Pre event handler code form form control clicked method.
    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"

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 Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

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,113 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans