Dynamics Business Central / NAV Development Developer Digest - Vol. 405

Dynamics Business Central / NAV Development Developer Digest - Vol. 405

ArcherPoint’s Developer Digest focuses on Microsoft Dynamics 365 Business Central and Dynamics NAV development. In Developer Digest Volume 405, you’ll learn about Media and MediaSet data types in Business Central, the merits of auto-updating fields starting in version 21, and In-Client Performance Profiling for BC.

The Dynamics NAV and Business Central community, including the ArcherPoint technical staff, is made up of developers, project managers, and consultants who are constantly communicating, with the common goal of sharing helpful information with one another to help customers be more successful.

As they run into issues and questions, find the answers, and make new discoveries, they post them on blogs, forums, social media…for everyone’s benefit. We in Marketing watch these interactions and never cease to be amazed by the creativity, dedication, and brainpower we’re so fortunate to have in this community—so we thought, wouldn’t it be great to share the wealth of information with everyone who might not have the time to check out the multitude of resources out there?

Thus, the ArcherPoint Microsoft Dynamics NAV/BC Developer Digest was born. Each week, we present a collection of thoughts and findings from NAV/BC experts and devotees around the world. We hope these insights will benefit you, too.

Including Various Media in Business Central

The Business Central Geek shared How to Use Media Data Types in Business Central. The Media and MediaSet data types allow you to store media data (images, documents, text, and other types of media data) in Microsoft Dynamics Business Central. The media types, also known as MIME (Multipurpose Internet Mail Extensions) type, is an internet standard used to describe the contents of a file. The Media data type can store one file at any time while the MediaSet data type can be used to store multiple files.

A full list of supported types can be found at Working With Media on Records – Supported Media (MIME) types

From the blog:

Microsoft recommends the use of Media types over Blob in the documentation. Using the Media or MediaSet data type provides better performance than using a BLOB data type and is more flexible in its design. With a BLOB data type, each time the media is rendered in the client, it is retrieved from the SQL database server, which requires extra bandwidth and affects performance. With the Media and MediaSet data types, the client uses media ID to cache the media data, which in turn improves the response time for rendering the media in the user interface.

Even though Media types have better performance, you should be aware of their limitations when using them to store images because the expected behavior is not the same as Blob fields. Blob fields don´t need code to import the image, it´s built-in. Plus, Blob fields can be seen on lists as thumbnails, while Media can´t. Media images, however, can be seen in the tiles or tall tiles view.

See: Performance Articles For Developers: Pattern – Use built-in data structures for more on the performance characteristics of using the Media data types.

Is Auto-Updating Fields a Good Thing?

Stefano Demiliani identifies a potential issue in version 21 in his blog, Dynamics 365 Business Central 2022 Wave 2: the evil of the new field changes behavior.

The problem is that changes made to fields in BC are updated as the changes are made, not when the user leaves the page as in former versions. This can have an impact on how extensions are written as well as how users perform their work. The behavior can be disabled in the on-premises version but not in the SaaS version. Fortunately, Microsoft saw the post and their response is described in Stefano’s follow-up post, Dynamics 365 Business Central 2022 Wave 2: the evil of the new field changes behavior – THE HAPPY ENDING.

In-Client Performance Profiling for BC

Waldo explains client-side performance profiling in his blog, Setting the Sampling Interval for (in-client) performance profiling Business Central. The AL Performance Profiler introduced in v19 allowed developers to profile from VSCode and analyze the result in VSCode as well. (See AL Profiler Overview – Business Central | Microsoft Learn for more).

In v20, developers can perform similar checks on the client side using the In-Client Profiler. While both tools produce similar looking results, how they work is very different. The AL Performance Profiler injects code before and after every procedure being analyzed, whereas the In-Client Performance Profiler logs the state of the call stack at regular intervals. The blog also discusses some considerations when using this new feature. #bcalhelp, #ALGo

Interested in Dynamics NAV and/or Business Central development? Be sure to see our collection of NAV/BC Development Blogs.

Read “How To” blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV and Dynamics 365 Business Central.

Trending Posts

Stay Informed

Choose Your Preferences
First Name
*required
Last Name
*required
Email
*required
Subscription Options
Your Privacy is Guaranteed