Thoughts, Dynamics 365, random business ideas, etc.

How to integrate Mercury bank with Dynamics 365 Business Central

Next step on getting Dynamics 365 Business Central setup is using the Envestnet Yodlee connector for bank account automation. There’s a bunch of learn articles on how to set this up, but I wasn’t able to get it to work for all my bank accounts. I’ve included a link to the Learn article below.

Set Up Yodlee Bank Feeds – Business Central | Microsoft Learn

I have two banks I was trying this setup for; Bank of America (through CashPro) and Mercury. For all you US people, Bank of America is a stodgy old bank and Mercury’s tagline is “Banking for startups”, so I figured I’d be able to get Mercury working right away and not Bank of America, but, spoiler alert, I was wrong.

The Bank of America feed worked exactly as documented. After finding the CashPro connector and putting the correct credentials in, the connector worked great, I was able to schedule an automatic statement import, and I was able to see my transctions.

Mercury fell short, though. I think there’s an issue with the Yodlee connector and Business Central, because everything seemed to be going well. I selected Mercury, put in my credentials, and the connector showed my accounts and created linked bank accounts successfully. When I tried to enable the automatic statement import by clicking “Bank Statement Service”–> “Automatic Bank Statement Import Setup”, I got the following error message:

“Cannot setup automatic bank statement import because the selected bank requires multi-factor authentication.”

Copying the error details and pasting them in notepad gave me a little more information, but I still wasn’t sure what to do:

“Bank Account”(Table 270).”Automatic Stmt. Import Enabled – OnValidate”(Trigger) line 4 – Base Application by Microsoft

If this was Finance and Ops, I’d open the code in a developer machine and take a look at what’s going on during this validation. I tried figuring out how to do that in Business Central (because I have no idea what I’m doing), but I ran into some roadblocks. Thankfully, I found Microsoft’s GitHub repository with all the AL code in it and, by searching GitHub, found the piece of validation code I was looking for.

Yodlee bank feed AL code (github.com)

That code refers to a field called “Automatic Logon Possible” in the MSYodleeBankAccLink table.

Screenshot of AL code showing where the bank account is evaluated to see if automatic statement import is possible.

I next went and found that object definition in the code base and saw that this table ID is 1451.

Next step was to check this data. Apparently, there’s sort of a table browser functionality inside Business Central. By appending “&table=1451” to the URL, I was able to open up the table directly and look at the data. Sure enough, the Mercury account had the “Automatic Logon Possible” field set to no. What to do, what to do.

I mean, I knew that although Mercury DOES require MFA, so does Bank of America and it was working fine. I made an executive decision to figure out how to change this data even though I couldn’t find it on a form, and it probably shouldn’t be changed. In comes configuration packages.

I had run into configuration packages when I was doing the initial setup of my demo companies. They give you the ability to select tables and fields, export them to Excel, and then import them again. What I did, though, was export the data from table 1451, manually change that value for the Mercury account to “true” and then import it.

Set Up Company Configuration Packages – Business Central | Microsoft Learn

Once I did that, the automatic bank statement import dialog magically started to work, and everything was copacetic. I mean, I’m sure making this change will come back to bite me in the butt in the future, but I sure am happy today!

Learned lots of things:

  1. The AL code base is publicly available on GitHub
  2. There’s a table browser-like feature where you append the table ID to the end of the URL and can see all the fields
  3. Configuration packages allow you to change data you can’t change in the front-end and you probably should be very careful about changing.

Hope this helps.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

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