Monthly Archives: December 2019

Enum Data Type

Enum is a new data type in the Business Central introduced with the very first version of Business Central. Since then many changes have been done to them and currently, they are usable instead of Option data type without any hesitation.

In compare to Option, Enums have more benefits and moreover, they can be shared across more fields without the need to specify them again and again for every field.

The main advantages are

  • Single specification of options across multiple fields.
  • Extensible (if allowed)
  • Better readability if more values are defined

Example

Enum looks like any other object in AL (see below). In the property section of the object, there is only one interesting property – Extensible. By default, the value is true; however, if we don’t want the enum extensible from another extension, we can change the value to false.

In the body part, we define values. For each value, we can define ID, Name and Caption. The major difference from Option Data Type is how we define ID. In option, we had to put as many commas as we needed to get the ID, in Enums, we just write the ID as a number.

 enum 50100 "TKA My Enum"
 {
    Extensible = true;
    
    value(0; " ")
    {
        Caption = ' ';
    }
    value(1; "TKA First Option")
    {
        Caption = 'First Option';
    }
    value(10; "TKA Second Option")
    {
        Caption = 'Second Option';
    }
 }

Usage

Usage of Enum is very similar to Record/Page/… variables. See the difference from Option declaration.

 table 50100 "TKA Table"
 {
    ...
    fields
    {
        ...
        field(100; "TKA Option Field"; Option)
        {
            OptionMember = " ","TKA First Option",,,,,,,,,"TKA Second Option";
            OptionCaption = ' ,First Option,,,,,,,,,Second Option';
        }
        field(101; "TKA Enum Field"; Enum "TKA My Enum")
        {
        }
        ...
    }
    ...
 } 

Dart & Flutter: Setup Android emulator and Android device

Application development is not possible without testing. For mobile development there are two primary possibilities – test the application on a mobile device with Android or using Android emulator.

If you have an Android device (especially the one for which you are developing) it’s usually better to work with this device; however, in many cases, we do not have such opportunity hence we use emulators.

Using Android Mobile Device

To use your own device you have to allow USB debugging (https://developer.android.com/studio/debug/dev-options), connect the device to the computer and authorize your computer to access the device.

Using Android Emulator

Android emulator is a great tool for developing mobile apps; however, the most problematic part is that, like any other emulator, needs a lot of system resources.

How to set up

  1. Enable VM acceleration on your machine (if possible).
  2. Open “Android Studio”, click on the “AVD Manager” (under “Configure”) and select “Create Virtual Device…”.
  3. Choose a device that you want (or that is the most similar to the one you want). In case you need a different device setting, you can use “New Hardware profile” that allows defining configuration manually. For example, as I’m currently working with two devices (Honeywell ScanPal EDA51 and CipherLab RK25) which both have a different configuration from all presets, I had to configure emulators manually.
  4. Choose a system image for the Android version you want to emulate.
  5. Verify setting and continue with “Finish”.

CU 2019/12 for Microsoft Dynamics NAV 2015 – 2018 and Microsoft Dynamics 365 Business Central on-premises has been released

The cumulative update 2019/12 for Microsoft Dynamics NAV 2015, NAV 2016, NAV 2017, NAV2018 and for Microsoft Dynamics 365 Business Central (2018, 2019 wave 1, 2019 wave 2) on-premises has just been released.

VersionLinks
Microsoft Dynamics NAV 2015/CU62DownloadDocumentation
Microsoft Dynamics NAV 2016/CU50DownloadDocumentation
Microsoft Dynamics NAV 2017/CU37DownloadDocumentation
Microsoft Dynamics NAV 2018/CU24DownloadDocumentation
Microsoft Dynamics 365 Business Central on-premises/CU14DownloadDocumentation
Microsoft Dynamics 365 Business Central Spring 2019 on-premises/CU07DownloadDocumentation
Microsoft Dynamics 365 Business Central 2019 Wave 2 on-premises/U15.2DownloadDocumentation