Create a custom Email Scenario For Business Central

Today I had to send a specific email from Business Central from a specific backoffice account. Roberto Stefanetti has written an excellent blog post about Business Central email and email scenarios. Which is fine for the built in processes but I had an entirely new scenario.

The solution was simple, all I had to do was extend the “Email Scenario” enum and use that scenario for generating my email. Below is the whole setup and code. Enjoy!

Published by René Brummel

My driving force is the will to learn. Every day brings its unique challenges, my goal is to rise to each challenge and learn from it. My professional expertise is the streamlining and optimization of business processes. My experience ranges from software development (I know AL, C/AL, C#, .NET, JavaScript, ReactJS etc) and implementation to business processes optimization, project management, training, and coaching. At the heart of what I do lies my vision, “sustainable change comes from conscious choice, made out of free will”.

4 thoughts on “Create a custom Email Scenario For Business Central

    1. The email scenario is selected when you create an email from code. So when you create an email from an order the Sales Order scenario is used. Check the Assign Scenario page for this.

      The scenario is used to specify you outbound email options. With a scenario you can specify for instance which account sends the email So you can send sales documents from sales@yourdomain and purchase documents from buyer@yourdomain.

      When you create your own email scenarios you must call them from that part of your code that generates the email.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: