Events vs Interface :- Business Central

While working on new baby ‘Interface’ identified few difference between Events and interface.

EVENTSINTERFACE
Select Events to Subscribe. Subscription optional.All Methods are mandatory defined in interface code unit and need to implement all
Used to react Used to Invoke.
Extensibility for few methods or functionsExtensibility for many methods.
All Subscribers are invokedOnly single code unit is invoked.
Can Invoke Interface.Can bind events.

Hope this will help you..

Stay tuned for more.

Business Central : enum vs Options

With the release of Business Central 2020 Wave 1 lot of new features has been added to make product more prominent.

Though this concept of ENUM was introduced earlier but from new version onwards most of the option fields are available as extensible enum such as follows that means option fields goes away from table.

Based on few queries received thought lets write down few difference between enum and option.

EnumOption
An enumeration type, also known as an enum in programming, is a keyword used to declare a type that consists of a set of named constants. The list of named constants is called the enumeration list. Enums can be used as table fields, local and global variables, and parameters.In the OptionString Property of the field or variable, you can enter the option values as a comma-separated list. The Option type is a zero-based enumerator type, which means that the option values are assigned to sequential numbers, starting with 0. You can convert option data types to integers.
To declare an enum in AL you must specify an ID and nameTo define option need to add value as comma-seprated list
Enum with extensible property set to true can be extendedTo extend option value need to modify the base table and add the required value
How to define enum
enum 50110 MyList
{
    Extensible = true;
   
    value(0; None) { }
    value(1; First) { }
    value(2; Second) { }
    value(3; Third)
    {
        Caption = ‘My List’;
    }
}
How to define option
field(2; OptionField; option)
{
    OptionMembers = “Option with “, “spaces and “, “other symbols!”;
}

To extend the standard enum from base product visit here

Stay tune for more..