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

Exception handling in AL Code Business Central

(0) ShareShare
ReportReport
Posted on by 249

Hi All,

I have a requirement to create 100K Sales order, its fulfillment, and payment settlement in BC through some custom logic. So, I have written SOAP endpoints and then perform SO Create, then fulfillment, and then payment settlement in sequence.

Now there is a good chance, due to any config issue or logical error, SO Create operation complete successfully but its error comes in the fulfillment process. Is there any way, we can implement transactions so that system automatically rollbacks everything for a particular order?

Also, how can we use TryFunction in this situation as the documentation says, we should not use DB write calls in TryFucn()

docs.microsoft.com/.../devenv-handling-errors-using-try-methods

Regards,

Saboor Ahmed

  • Suggested answer
    Andy Sather Profile Picture
    on at
    RE: Exception handling in AL Code Business Central

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 448 Super User 2025 Season 1

#2
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 358

#3
Mansi Soni Profile Picture

Mansi Soni 327

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans