Formatting Phone Numbers in SQL Reporting Services

Every time, without fail, I need to create a phone number on an SSRS report for a client and get stuck with phone formatting. Every time I am searching forums. I thought it would be awesome if it was in some amazing blog that I could visit and copy from each time.

So... here it is, if not for myself, then for others:

In Report Builder or visual studio, add your phone number field to the report. 

Right click on that text box where you added the field and click on expression. 

Clear the formula box and type in the expression below.



Formula to Use: 
=IIF(Fields!Phone.Value Is Nothing, Nothing, IIF(IsNumeric(Fields!Phone.Value), Format(Val(Fields!Phone.Value), "(000) 000-0000"), Fields!Phone.Value))














Note: My field is actually called Phone. If your field is not called phone, you will need to replace it with your phone field name. (Like: Fields!E_T_PHONE_HOME.Value)


Then click on OK at the bottom of the expression box.

Run your report.








Magic...
Until next time.

Verifying Email Messages Sent from Business Central

In Dynamics GP, you could always track if an email was sent by visiting the sent box of your inbox after sending the emails. 

After much research, this does not occur with Dynamics BC. When setting up email, you set up one universal email account and therefore it does not prompt you for credentialing when sending emails. This leaves the user to wonder where will you find if an email was sent to a customer or vendor and how do you resend it?

Enter- Interaction Log Entries in Dynamics Business Central

In the search box, look for Interaction Log Entries. 












The first checkbox will show you if the interaction was cancelled. The second will show you if the attempt failed. 

If you go to Actions in the taskbar, you can several other options for the interactions. 


















If a user needs to create an interaction in 365 for Sales/BC, they can do that from this window. You can also evaluate the interaction as well. 

If the user did not get the email, from here you can resend. 

To clean up the entries, you can also remove cancelled entries. 

Need to create a task to remind yourself to contact the customer or vendor again? You can do that from here as well. 

You can setup different interaction templates in the interaction template setup. 

Pretty cool stuff. 

You can read more about these entries here: 
https://docs.microsoft.com/en-US/dynamics365/business-central/marketing-auto-record-interactions



Dynamics Business Central- My Favorite Things #6- Direct Integration with D365 for Sales

  Microsoft Dynamics 365 Business Central   My Top 10 Favorite Things #6- Direct Integration for Dynamics 365 Business Central and Dynamics ...