Business Central Demand Forecast Save Filters 💾

A while ago I wrote this blog and more recently this has landed in BC: so the timing is right to review.

This is currently a feature which needs enabling before you can use it (📝note it is auto enabled Q2 2023):

It’s a great set of improvements so my previous blog can big ignored from this point on. However, do I have everything I need to work quickly and effectively? That’s what I aim to question with this need post by posing an additional design idea.

When a user leaves the page it remembers the previous filters that were in place, which I really like 😍. Got me thinking though about saving other filters and then providing the ability to jump between those. Idea being that you have given a user a greater flexibility with filters so why not further enhance that experience? In standard BC it would be similar to that of the ability to save general journal templates or segment criteria, if you know CRM in BC.

For Demand forecasts I was thinking something like this:

The saving process could then be like this:

A user could be offered the chance to alter filters and apply them to other forecasts too:

If you think this would be a good addition please comment, like the post or use the voting buttons:

I’ll look at posting it as an idea if others think it’s worthwhile. Hopefully we’ll see if it makes it to the base app in the future 👍 If you don’t want to wait around for that here is the code which generates the experience shown:

Business Central Attach Email Body 📎📧

I recently did a post about how BC works with emails for CRM mostly. Check it out here:
This got me thinking about another scenario which I get asked about from time to time by prospective clients. If a customer/contact emails something important can you then attach that to a record in BC?

Now, I accept that attaching in BC is a nice user feature but I also appreciate long term it will build up the database size. I’m leaning towards the practical side of the argument in that checking emails in the interaction log entries isn’t that intuitive (check the referenced blog to understand more). Checking the attachments of a document or master record is though. Especially for critical information like a purchase order reference for a sales order. My idea for a solution stems from the wave 1 2022 release of this functionality – to save you checking it allows users to take email attachments into BC attachments for records:

If you have used the BC outlook add-in you will probably know about the “Suggested Line Items” feature. This is where you choose to create a new sales document and it reads the email body to find matches for items in the company. I’m mentioning this because the two features I’ve brought up resulted in my answer.
My scenario with an example. Here is an email exchange between Tim who is a BC user and his customer. They want to progress with the order and have responded with their Purchase Order reference with.
Using the BC Outlook add-in the user finds the Sales Order and follows the steps shown above – clicks on the ellipsis icon, scrolls and locates “Attachments”, finds a new button called “Attach email body”.
This will add the html of the email as an attachment record. I used the current date and time in conjunction with the email subject to create the name of the attachment. You could use something else of course.
Users aren’t able to view the attachments in the BC Outlook add-in – be it html or not. This is the message which pops up if they try.
However, in the BC web client a user can work with the attachment as normal by clicking on it to download, share or open in OneDrive. Given it is a HTML file I have added an extra option, which makes the most of a standard feature. The new button is “Preview Email” and it displays the HTML attachment. Granted it’s not perfect but it’s a quick and effective way of viewing the details without having to go rooting around in the interaction log entries
I’ve made it so the “enabled” property of the page action only works with files that have the html “File Extension”.

Like what you see? Want to try it out? You can find the code here:

I attempted to make the HTML nicer by using but the result was the same as the standard preview. If like me you want to have the preview formatted correctly you will need to try a different approach – which is another copy of how standard BC does it.

Here is how the preview page looks when it is passed the text value from a report object instead – which is then saved as HTML. Code for this one is on github too.

Business Central CRM Email 📨

During demo engagements I often get asked to demo BC CRM. This can be because it’s a good fit or a best of breed CRM is currently out of reach. As part of this they want to know how much can be done with emails – the bread and butter of CRM. There are a few different uses of the term “Email” in BC and how a user can send or review emails. I had to create a guide on each area so thought it might be worth a share. Given this is CRM focused it is worth noting that these features work with contacts*. I will cover the following email situations:

  • Outlook synchronisation (this is the main topic to cover)
    • From Outlook add-in
    • From within BC client
  • Create Interactions
  • Send By Email
  • Segments
  • Sending documents (*this works without contacts)

Outlook synchronisation

For details on how to setup this up check out this video:

Once the main setup has been done each user will be setup like so and will have a new folder added to Outlook called “Queue”. Jump to the bottom of the blog for new user setup tips

If contacts in BC is a new concept the easiest way to get up and running is using the BC Outlook add-in. Brand new contact from the lens of the BC Outlook add-in will ask to create a contact for the email address. This is the simplest way to get moving with contacts if you don’t have them in place already:

Creates a contact record – which is essentially a copy of the contacts you store in Outlook:

Respond to the email in Outlook as you would usually do. For the original email and the response entries are placed in the special “Queue” folder:

The “Queue” folder can be emptied if the above codeunit is running on the job queue.

Once the job queue has run it will bring in the emails to the interaction log entries:

*note the “Salesperson Code” depicts who the email is to/from. The “User ID” is in fact the user which originally setup the integration.

If a user chooses “Show Attachments”

It will display this message:

Which opens a new tab with the email from Outlook

If you reply in outlook, then the email will be available to view in the Interaction Log Entries – which you can open as shown before:

Detail is all available on the contact card:

What about if you use the “Send Email” feature in BC?

I’m choosing it from the Outlook add-in here but it is the same in the BC web client too

That also goes into the Outlook “queue” folder. The “Send Email” feature allows you to send as a different email address (the from address). If that isn’t a user synchronised with BC then the email will not go to the interaction log entries.

When done with the “current user” the email will appear in both the “Sent Items” and the “Queue” folders:

Once an email has been passed to BC the “Queue” folder will no longer contain the email. Because you have done this in BC you can also see the entries in another location, other than the Interaction Log Entries:

The Interaction Log Entries also has a copy just like before

The “Queue” is accessible by other users so you can see email traffic that has gone to BC defined contacts:

Different user accounts inbox view

What about seeing the BC details from Outlook? From the add-in you can access interaction log entries in a couple of places:

Drilldown on the

Create Interactions

“Create Interactions” is an action users see in scenarios where contacts are in use. It is available directly on the contact, opportunities, tasks or on the interaction log entries page. When using the feature you are effectively calling upon ready to go email or attachment templates.

Here is a basic free type email interaction to a contact
This pops open the BC email page before sending and adds it to the contact card in the “History” section:
The “Queue” folder will receive an entry too

What’s confusing about this is that you end up with two interaction log entries. One is the one instantly created by using the feature and the second is part of the Outlook synchronisation:

If the user clicks on the “Attachment” for the entry for Outlook it pops the message from earlier

If you choose the none Outlook one it opens a page like this:

How do you tell the difference? Use the “Email Logged” field as “TRUE” with a filter


The exception to this rule, if you use the “Segments” feature which uses interactions you do not get the duplication in the interaction log entries.

Here are some previously logged segments where specific contacts have been targeted. Can be for sales, marketing or customer service purposes.
When a user chooses an entry it will just show it in the preview page and not by opening Outlook

Sending Documents

The last email scenario a user can do is for documents. Posted Sales Invoice for example has 2 email related buttons but they both result in the same thing ultimately, however the 1st to the left asks an extra question about the output

Extra page which is shown when using the 1st “Send” email option

This will also create an interaction log entry:

And show it in your users “Sent Items”:

New User Setup

If a new user wants to have their emails synched then they we’ll need to firstly be setup in the user setup page and have a “Salespers./Purch. Code” assigned to them.

Following on from that the user will need to have their account synched. Access the above page from the early shown “Exchange Sync. Setup”. Add the “Queue” folder by choosing “Add Favourite” in Outlook. The “Queue” folder will be one of the options available to the user. If the new user doesn’t see any results in the Outlook “Queue” folder straight away don’t be surprised. Other users who have been connected for a while will see their activity though:
If you the user doesn’t get access to the folder then you can logon to exchange and force the issue by adding them to the public folder
New entries have the “JA” Salesperson Code