web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,075
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)
  • Suggested answer
    Govinda Kumar Profile Picture
    2,262 Moderator on at
    How to use Try Catch (Error Handling) in Business Central
    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.
  • Suggested answer
    YUN ZHU Profile Picture
    90,354 Super User 2025 Season 2 on at
    How to use Try Catch (Error Handling) in Business Central
    Hi, hope the following helps as well.
     
    Thanks.
    ZHU
  • Gerardo Rentería García Profile Picture
    22,957 Most Valuable Professional on at

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,710

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,675 Super User 2025 Season 2

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,203

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans