Skip to main content

Notifications

Announcements

No record found.

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

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

(0) ShareShare
ReportReport
Posted on by 1,707
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.
 
  • 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 74,115 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,338 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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans