by Steve Endow
While copying a standard Business Central Web API page to a new project to create a customized version of the API page, I encountered this compiler warning:
AL0603 - Implicit Conversion to a value of type Enum |
Steve Endow is a Microsoft MVP who works with Microsoft Dynamics 365 Business Central, Azure, .NET, SQL Server, and Power Platform
Dynamics 365 BC Resources List:
steveendow.link/bcresources
OR: bit.ly/bcresources
by Steve Endow
While copying a standard Business Central Web API page to a new project to create a customized version of the API page, I encountered this compiler warning:
AL0603 - Implicit Conversion to a value of type Enum |
by Steve Endow
If you are a Dynamics 365 Business Central developer or ISV, you should definitely get access to the Business Central Insider program.
Business Central Insider Program |
I don't know why the BC Insider program is so cumbersome to join, but I'm guessing it involves lots of lawyers. Which is unfortunate, since I think BC Insider is an essential program for any BC developer.
I thought I had a link to the BC Insider program on my BC Resources page, but apparently not, as it seems to require several steps, and is not available through a single URL, unfortunately.
I did a few DuckDuckGo searches, but came up with nothing. I then did several Google searches, but still couldn't find any Microsoft pages explaining how to join the BC Insider program.
After several searches, I finally found Daniel Rimmelzwaan's excellent blog post from February 9, 2022:
http://thedenster.com/insider-builds-on-collaborate
Thankfully, he documented the process for signing up for Business Central Insider after going through the same puzzling search for one of his clients.
By Steve Endow
I recently responded to a Business Central Community Forum post here:
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=* |
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 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.
[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.
by Steve Endow
I had a difficult time finding an example of this type of API filtering using the OData $filter query option, so I wanted to share an example that I needed for a project.
For context, this is a very simple example of a Business Central API "child array" that I wanted to filter. Technically, I think that OData calls this an "expanded navigation property".
Customers with Expanded contactsInformation Navigation Property |
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 |
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.
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...