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

How to use Try Catch (Error Handling) in Business Central

(1) ShareShare
ReportReport
Posted on by 2,102
Hi Community,
 
I have a requirement to Create a customer from a custom table in which all the data related to the customers are imported using XMLPort. To Create Customers I have created an action. After Clicking on this Action If the customer Exists, Skip that Customer & If the customer does not exist, create a new Customer with all the related data. I have also created a field to show error that occurs during this process.
 
 
So How can I use Try & Catch (Error Handling) in Business Central for this Requirement? If you have any solutions then please provide me the solutions.
 
Thank You.
 
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    25,547 Most Valuable Professional on at
  • Suggested answer
    YUN ZHU Profile Picture
    98,773 Super User 2026 Season 1 on at
    Hi, hope the following helps as well.
     
    Thanks.
    ZHU
  • Suggested answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at
    If you want to handle errors in Business Central, you can try other methods with try-catch.. find more information in this article https://businesscentralgeek.com/3-ways-to-handle-errors-in-business-central. For a better understanding of try-catch and transaction scope, watch this helpful video https://www.youtube.com/watch?v=788AtdoxckA&ab_channel=ErikHougaard
    Regards.

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,747 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,016 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 506 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans