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 :
Small and medium business | Business Central, N...
Suggested Answer

exit an action from OnBeforeAction Trigger

(1) ShareShare
ReportReport
Posted on by
Hi,
 
I have an extension to extend a Page Action.  In my OnBeforeAction triggger I have an EXIT statement if users reply No in my confirm dialog.  However, this doesn't prevent the OnAction trigger executed in base code.  I am wondering if there is a way to prevent the OnAction trigger been executed from OnBeforeAction trigger in extension.
 
Thanks
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    98,421 Super User 2026 Season 1 on at
    Hi, try using Error(''). To explain it simply, use Dialog.Error(ErrorInfo) Method to terminate the code without throwing any message.
     
     
    Hope this helps.
    Thanks.
    ZHU
  • Judy Profile Picture
    Microsoft Employee on at
    Hi,
     
    Please also check the old thread for the same topic:
     
     
    Best Regards,
    Judy

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,850 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,045 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans