Showing posts with label Dynamics 365 Business Central. Show all posts
Showing posts with label Dynamics 365 Business Central. Show all posts

Thursday, June 1, 2023

Business Central Simple Tip #5: Comment Lines, Standard Text Codes, and Extended Text

by Steve Endow

(Thanks to Kristen Hosman for showing me this feature!)


Business Central has a very cool feature that allows you to add text Comments to transaction lines.  I'm excited about it because I don't believe we had an equivalent feature in the Dynamics GP world.

The feature appears to be well designed and implemented in Business Central, but the official MS documentation on the elements of the features are limited, so I don't think the docs to the feature justice.

There are 3 elements to the overall "feature" in Business Central:

1. Comment Line Type

2. Standard Text Codes

3. Extended Text


Comment Lines

When entering a transaction in Business Central, such as a Sales Invoice, the Line "Type" field can be set to "Comment".  You can then manually enter comment text in the line Description field.  This is the simplest option for ad-hoc comment lines, but the Description field is limited to 100 characters, so if you need more than 100 characters, you would need to add multiple Comment lines.

Thursday, January 19, 2023

Business Central Simple Tip #4: Exporting Leading Zeroes to Excel and then CSV- It works fine!

by Steve Endow

This may seem obvious to some, but I've learned through many painful lessons that unless I actually test a scenario and see for myself that it works exactly as desired, it can be dangerous to make assumptions about software functionality and offer promises to customers...


ERP users regularly need to export data to CSV files, and then send or use those CSV files somewhere else. 

A common problem with working with CSV files is that leading zeroes can sometimes be removed by Excel.  This typically occurs when a user opens an existing CSV file, makes a change, and then saves the CSV file.  During that CSV editing process, Excel will typically remove all leading zeroes from field values.

A customer recently asked us to create a custom file export to send to their bank.  They need a list of payments created in Business Central, as well as all of the purchasing invoices that were paid by that payment--essentially a remittance file.

To keep things simple at first, we're looking to create a custom Business Central List Page that has all of the fields the customer needs for their bank.  A user can then just click on the Open in Excel action from the list page to save the data to a file.

Open in Excel from a List Page

Thursday, December 29, 2022

Business Central Simple Tip #2: Update AppSource Apps

by Steve Endow

(There is some technical background involved in this Simple Tip, so if I got any details wrong or missed something that is important, please let me know).


Today's Business Central Simple Tip comes from the book Administrating Microsoft Dynamics 365 Business Central Online by Andrey Baludin.

It relates to "AppSource Apps" that are installed in your Business Central Online Environment.  If you have Andrey's book, turn to page 46, and look for the heading "Apps and sessions".

He provides instructions on how to navigate in the Business Central Admin Center to the "Manage Apps" page.  The Manage Apps page lets you see a list of apps that are installed in that particular Environment.

Business Central Admin Center - Manage Apps Page

Wednesday, July 27, 2022

Disable The Annoying Dialog After Posting in Business Central

by Steve Endow

Why does this dialog appear by default after EVERY document posting in Business Central?

This is an annoying dialog

I was recently on a call with my colleague Tanya Henderson to review some accounts payable payment processes in Business Central.

After I posted a purchasing invoice, she told me to click No on this useless dialog, saying that she has to train all of her customers to click no, and she wished she could get rid of it.  

Can this dialog be turned off?  If not, can a PTE suppress it after posting?

Challenge accepted!

Friday, May 20, 2022

Exploring Business Central Custom Table Indexes

by Steve Endow

In my last post, I poked around in SQL to see what custom fields looked like in the database for a Business Central table extension.

While looking into fields, I happened to notice the table index that is automatically created for the table extension.

Automatic Table Extension Index

If we look at this index, we see it is a Clustered Unique index for the "No_" field only.

Default Clustered Index on Table Extension

Why is this default index created automatically?  This Table Keys docs page briefly mentions the default Clustered Index on table extensions.

Friday, March 4, 2022

Business Central Web API Error When Using $expand

 By Steve Endow

I recently responded to a Business Central Community Forum post here:

https://community.dynamics.com/business/f/dynamics-365-business-central-forum/448915/api-query-with-odata-date-filter-with-encoding

While researching that question, I learned something from that forum post:  $expand=*

Huh, I didn't know that was possible!

If you aren't familiar with the $expand OData query option, check out my blog post on the topic:

https://blog.steveendow.com/2021/09/using-metadata-and-expand-with-business.html

So it seems that you can use a wildcard with $expand to automatically expand all Navigation Properties available in a Business Central Web API endpoint. Very interesting!

I personally don't think I would ever recommend using such a query option in a real world API integration, but I was intrigued by the possibility!

So I fired up Postman and did some testing with my new found query option.

Query Option $expand=*

Friday, January 14, 2022

Is Agile Development viable for Business Central customizations?

 by Steve Endow

To the Agile Advocates (tm) who will immediately protest "Of course it is!" before reading on, I ask:  

Hear me out.


Reference:  What is Agile?

Reference:  What is Agile Development?

Reference:  Manifesto for Agile Software Development

Book:  Agile Project Management for Dummies 3rd Edition

Book:  Agile Estimating and Planning

Book:  Scrum: The Art of Doing Twice the Work in Half the Time


Disclaimer:  I'm not an Agile expert.  I'm someone who has tried to learn about Agile (on several occasions) and tried to understand if and how some Agile practices might be used in the projects I work on.  I'm asking lots of questions, for which I'm having a difficult time finding answers on my own through part time self-study.


"Agile Development". It sounds cool. It sounds compelling. If you've ever suffered on a long, complex project that was over budget and seemed like it would never end, you'll likely appreciate some of the benefits that Agile claims to offer.  You'll read the Principles behind the Agile Manifesto and say, "Yes, please!"

It definitely appeals to me.

But then there is the reality that I personally work in.  Over the last 26 years, I have done consulting and development work mostly for "mid-market" customers in the US.  Based on my years of experience, admittedly with organizations and teams that didn't have "best practices", I'm having a difficult time trying to map Agile practices to the mid-market ERP projects that I typically encounter.

My inquiry is not about whether Agile is good or bad.  I'm trying to understand if Agile is a good fit, or even a viable option, for my customers and my projects.

Monday, January 3, 2022

The Business Central Default Dimension Priorities Feature

by Steve Endow

[NOTE: I'm new to Business Central Dimensions, so if I got anything wrong, or missed any important details, please post a comment below and let me know. Thanks!]

I have recently been exploring how Business Central can provide default values for Dimension Codes.

For example, if I create a new Sales Invoice in Cronus, select Alpine Ski House as the customer, and then add an ATHENS Desk as a line item, both the Customergroup Code and Department Code dimension fields remain blank on the line.

No Default Dimension Values

Why are these Dimension Code fields blank?  In this example, they are blank because I don't have any Default Dimension Value Codes defined for the Customer or Item records.  Let's explore how we can get Business Central to provide default values for those Dimension fields.

Monday, November 15, 2021

Troubleshooting BcContainerHelper Docker Build Errors on Windows 10 versions 21H1 and 21H2

by Steve Endow

If you've been using Docker Desktop on Windows 10 to build Business Central Docker containers with BcContainerHelper, you have likely encountered build errors for some reason.

Freddy Kristiansen has been constantly working to improve BcContainerHelper to deal with weird Windows version issues and Docker Desktop quirks, but it seems that Windows 10 versions 21H1 and 21H2 are currently causing some build errors, despite Freddy's best efforts.

If you are unsure which Windows 10 "version" you have, you can click on the Windows Start button and type "winver".  

Windows 10 - Version 21H2

I've reviewed a few issues on the BcContainer GitHub repository while helping a few people troubleshoot BC container build issues recently, and it appears there are currently 3 techniques to try and resolve errors when using Docker Desktop and BcContainerHelper on Windows 10 versions 21H1 and 21H2.

As of November 2021, if you are using Windows 10 version 21H1 or 21H2, you should see this warning from BcContainerHelper during the build process.

Windows 10 21H1 / 21H2 Warning Message

If you do see this message during your build, do not be surprised if the Docker Container build process fails.

Here's an example of one type of error that may occur:  "Docker Build failed with exit code -1"

Docker Build failed with exit code -1

Here are the 4 workarounds that seem to help resolve errors on the newer versions of Windows 10.


1. Temporarily disable Windows Defender Real-time Protection (under "Windows Security").  It seems that Windows Defender real-time virus scanning is interfering with the Docker Container build process, and either causing some type of file lock, or a quarantine, that is interfering with the build process.  Disabling the Real-time protection stops the file scanning, which may resolve your build error.

After the container is successfully created, you can re-enable the Real-time protection.  (but you'll probably need to turn it back off again temporarily the next time you create a new container)

Windows Defender Real-time protection setting


2. Completely disable Windows Defender temporarily (under "Windows Security").  A developer shared with me that he had previously been able to disable Defender Real-time Protection to build BC Docker Containers, but recently, that stopped working.  When he completely disabled 


3. Remove the imageName parameter from the BcContainerHelper script.  I saw this mentioned in a GitHub Issue, and it seems to have worked for Matthew Perren.

I don't know if the image creation process is triggering an error directly, or if skipping the named image process avoids a potential issue with Defender that is causing the problem.  But if disabling Defender Real-time protection alone doesn't work, try removing imageName.


4. Try adding the "-isolation hyperv" parameter to the BcContainerHelper script.  This used to be the go-to solution for a version mismatch between the host OS and the container OS, but it seems that with 21H1 and 21H2 the isolation mode does not always resolve build errors.


If you do encounter container build issues with Windows 10 version 21H1 or 21H2, please let me know if one of the steps above worked for you, or if you found a different solution to your build error.


Steve Endow is a Microsoft MVP in Los Angeles.  He works with Dynamics 365 Business Central.

You can also find him on Twitter and YouTube

Monday, November 8, 2021

Business Central Chat with Stefan Maroń: Designing Complex Pages in BC

 by Steve Endow

Stefan MaroÅ„ was kind enough to have an impromptu live stream with me today to help me understand how to design complex pages in Business Central.  We discussed how I might develop replicate the functionality of the .NET interface of my "Data Generator" application in a Business Central page.


In addition to designing the UI of a data generator, Stefan shares some very valuable information about how to process background tasks in Business Central, which I was unfamiliar with.

Here is a link to the "Coding4Performance" series on his blog:

    https://stefanmaron.com/?s=Coding4Performance


Here is the recording of our discussion:


https://www.youtube.com/watch?v=bcWSwIjZSG8


Steve Endow is a Microsoft MVP in Los Angeles.  He works with Dynamics 365 Business Central, Microsoft Power Automate, Power Apps, Azure, and .NET.

You can also find him on Twitter and YouTube

Tuesday, October 5, 2021

Docker Engine Enterprise and Mirantis Container Runtime for Business Central Developers

by Steve Endow

NOTE:  This post relates to Docker Engine Enterprise and Mirantis Container Runtime on Windows Server.  I don't believe this relates to or affects Docker Desktop.  But let me know if I missed anything regarding Docker Desktop, and let me know if I have any details wrong regarding Mirantis Container Runtime and its use with BcContainerHelper and Business Central Docker containers.


On September 27, 2021, Tobias Fenster shared a Microsoft announcement about the future of Docker Engine Enterprise, sometimes referred to as "Docker EE".  

https://twitter.com/tobiasfenster/status/1442533006812631047?s=20


This Microsoft announcement comes almost 2 years after Docker was acquired by a company named Mirantis, in November 2019.

The Microsoft announcement indicates that technical support for the Mirantis Container Runtime will be transitioned to Mirantis.

Mirantis also published a post explaining the transition, and discussing options for receiving support for Mirantis Container Runtime (aka "MCR"), and free licenses for up to 9 "nodes" for Windows Server users.


So what does this mean for Business Central developers who use Windows Server?

When I first read the Mirantis blog post, I assumed I would need to contact Mirantis to take advantage of their "special offer" to receive a free license for MCR for my Business Central development on Windows Server.

This page on the Mirantis web site explains the "beta pricing" offer is available until December 31, 2021.


I thought that I would request licenses for a few nodes, which would cost me $0.  But, that would NOT include any support.  

I'm okay with the $0 price tag, and if I did need support for some reason, I would be open to paying a reasonable price for support.  I would even be open to paying $50 per node to receive limited support, but based on the information on the web page shown above, it is not included by default with the 1-9 or 10-50 note packages by default.  But it may be possible to purchase support separately for 50 nodes or less.

I'm assuming that after December 31, 2021, Mirantis will come up with new pricing, and MCR will not be free for Windows users.


What about "Moby"?

But today I re-read the Mirantis blog post and noticed this.


Wait, what?

I'm a Business Central "developer".  I am not using my containers in "production".

Does that mean that I can use the "default Moby engine"?  Whatever that means?

I posted my initial thoughts about this to the hive mind called Twitter:

https://twitter.com/steveendow/status/1445494238955720713


I tagged our resident Business Central Docker expert, Tobias Fenster to see if I was missing anything.

I'm glad I tagged him, because he shared some important information about how Docker works and additional considerations about the Mirantis announcement that I believe are pretty important to Business Central developers.

Tobias replied, and mentioned that the free Moby engine has "No client component".


I didn't know what this meant, so he generously explained further.

So while we could run BC containers using Moby, technically we would not have a docker.exe "client" to manage or create the containers on Windows Server.


It seems we will need MCR

You can read the rest of the Twitter thread if you would like, but after a few more questions from me, and answers from Tobias, these are the points I think are important for BC developers who use Docker Engine Enterprise on Windows Server.

1. If you do NOT get a license for the Mirantis Container Runtime (MCR), and choose to use the "Moby engine", that is ONLY the "server" (daemon) portion of the solution.  Moby will allow you to host containers, but technically, that does not include the docker.exe "client" or any tools or utilities to help you manage your containers.  You could try to find other Docker tools, but Tobias suspects that limited interest in Docker on Windows means limited options for Docker tools on Windows.

2. As a Business Central developer, I regularly use the docker.exe "client" command in PowerShell to manage containers and images.  So I believe I will still need that, and therefore will need MCR.

3. The BcContainerHelper PowerShell module that BC developers use to create Business Central containers relies on the docker.exe "client" tool to create and maintain and interact with containers, so I assume that the full MCR solution will be required in order to continue using BcContainerHelper.  (there may be other ways to download a docker.exe client or equivalent, but I have no yet researched that)


Given this, I will want to request the MCR licenses from Mirantis so that I can have access to the full MCR product suite on my Windows Servers and continue to reliably use BcContainerHelper.


If you are aware of other solutions that provide a Docker client and related tools on Windows Server and work well with BcContainerHelper, please let me know.


Steve Endow is a Microsoft MVP in Los Angeles.  He works with Dynamics 365 Business Central, Microsoft Power Automate, Power Apps, Azure, and .NET.

You can also find him on Twitter and YouTube

Tuesday, June 1, 2021

Restoring data from a broken Business Central Docker Container

 By Steve Endow 

(This blog post is inspired by a forum question. Credit to Arvydas for the question and sharing the solution.)

What if I made the mistake of storing some "worthwhile" data in a Business Central Docker container over the course of several months?  Perhaps it was test data or data imports that I didn't think I would ever need--but then 3 months later I realized that the accumulated data was valuable.

In theory, no big deal.  If you realize that you want to keep the data from a working container, Stefan MaroÅ„ has a blog post with instructions on converting that Container into an Image using "docker commit".  Just create an image and you can make new containers from that image.  You could also backup the SQL databases from the Docker Container to the local file system.  

But, what if the Business Central Docker Container with your valuable data stops working due to a Windows Update?  And you only realize you need that data after the container stops working.  If the Container can't be started at all, how can you extract the Business Central data?

This solution appears to allow me to copy the SQL mdf and ldf files from the broken container to my local file system, then copy the mdf and ldf files to a new working container to effectively "restore" them.

This may not work for all situations where a BC container has issues, but should work if the container is intact, but just won't start up due to a Docker or Windows issue or error.  

Let me know if there are any issues or caveats with using this method to restore the data from a container.

Friday, February 12, 2021

Creating a simple text file using AL in Business Central - Sample Code

 By Steve Endow

On January 23, 2021, I recorded a video showing how to create a simple text file using AL in Business Central.


Here is the video:

https://www.youtube.com/watch?v=_GUzlFKJFQk


Below is the sample code from that video.

PowerShell script to remove old Docker Images without deleting the base OS image

 By Steve Endow

If you are creating Business Central Docker Containers and regularly updating the artifacts and images for your containers, you may be familiar with this problem.

When you type "docker images" in PowerShell, you are greeted with a pile of old unused images consuming tons of disk space.

A digital junk drawer

I want to delete the old, unused Docker images.  But I do not want to delete the 10.4 GB "base OS" image that is listed at the very bottom.  As long as my OS version remains the same, that image can be used repeatedly, and if I deleted it, I would have to download it again.

Disable Browser Autofill with Business Central

 By Steve Endow

While using Business Central with Google Chrome, I started to notice strange words appearing in Business Central fields while I entered data in the browser.

Why are you doing this?

In this example, the word "test" was appearing when I clicked on the drop down list for bank accounts in Business Central.  The suggested value was in a text box displayed over the standard Business Central list box.

Friday, November 6, 2020

Page Inspection Keyboard Shortcut CTRL+ALT+F1 Doesn't Work on Laptop

By Steve Endow


Update: I originally wrote this post referencing my Lenovo ThinkPad P1 laptop, but it appears that similar Intel Graphics software is used on several different laptop brands and models, causing the same issue.  The name or appearance of the specific Intel Graphics software may vary, but the concept still applies.


If you use Dynamics 365 Business Central, you should be aware of the Page Inspection feature.

Inspect my page

https://docs.microsoft.com/en-us/dynamics365/business-central/across-inspect-page

One of the ways to open the Page Inspection pane while viewing a Business Central page in a browser is to press the keyboard shortcut CTRL + ALT + F1.

Handy Keyboard Shorcut


While doing some BC development and testing on my new Lenovo ThinkPad P1 laptop, I pressed CTRL + ALT + F1 to open Page Inspection.

But nothing happened.

Thursday, September 17, 2020

Why Business Central is Amazing #5: Community

 By Steve Endow

The Business Central Community is amazing.

Want proof?  

Here's a great example from my Twitter timeline this afternoon:

https://twitter.com/steveendow/status/1306667765369991168?s=20

This is Community

"Business Central Twitter" is in constant conversation.  Business Central community members from around the globe, quite literally, are asking questions, answering questions, posting updates, blogs, videos, and MS Docs articles.  

Tuesday, August 25, 2020

Why Business Central is Amazing #4: Native Web Interface

By Steve Endow

Do you know how I access Business Central?

I pull up my web browser, and I click a shortcut on the browser shortcut bar.

Single click

And you probably know what I see next.

I've arrived

A glorious, modern, rich, interactive, attractive, customizable user interface.  Take a moment to appreciate this significant feature of Business Central.

A "native" web interface.  A native web application.  Pretty amazing.

I didn't have to install an application on my computer.  I didn't have to configure anything on my computer.  I didn't have to setup a web server or install a web client.  In fact, I can access Business Central from any computer.  I just need a web browser.  Or I can install the Business Central mobile application.

Wednesday, August 19, 2020

Why Business Central Is Amazing #3 - No Access to SQL Server

 By Steve Endow

"What? Are you crazy, Steve? Not having access to SQL is a limitation! It's a weakness! That's not amazing!"

I am not trying to change anyone else's mind--I'm just sharing a few thoughts why I think that NOT having access to SQL Server is amazing.

I've been working with on-prem ERP systems since 1996, when I implemented Solomon IV for Windows, then MAS 90, then Peoplesoft, then Dynamics GP.  I'm aware of all the arguments for wanting or needing access to SQL. I get it.

But that direct access comes at significant cost.  And responsibility.  And risk.  And those things are not amazing.  Mid-market companies want to sell their product or service, to provide customer satisfaction, and to make revenue.  

They don't want to be in the ERP database administration business.  Or the ERP database backup business.  Or the ERP disaster recovery business.  Or the ransomware defense business.

Do you really want to be in the database administration and maintenance business?

Tuesday, August 18, 2020

Why Business Central Is Amazing #2 - No More VPNs!

By Steve Endow

I have an ERP joke for you...

Find a consultant who supports an on premises ERP application for dozens or hundreds of customers.

Ask them which of the 7 different VPN clients on their laptop is their favorite.

(rim shot)  

Just say no

How many digits can a Business Central Amount field actually support?

 by Steve Endow (If anyone has a technical explanation for the discrepancy between the Docs and the BC behavior, let me know!) On Sunday nig...