Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

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

Posted on by 1,654
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.
 
Categories:
  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 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
    YUN ZHU 73,296 Super User 2024 Season 2 on at
    How to use Try Catch (Error Handling) in Business Central
    Hi, hope the following helps as well.
     
    Thanks.
    ZHU
  • gdrenteria Profile Picture
    gdrenteria 12,063 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans