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 :
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,100
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,236 Most Valuable Professional on at
  • Suggested answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 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

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans