It’s Friday – September 23

Permanent link to this article: https://www.dvlprlife.com/2022/09/its-friday-september-23/

Dynamics 365 Business Central 2022 Wave 2 – Use option access syntax in formulas

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2022 Wave 2 has several exciting Development features for runtime 10.0. One of the exciting features is to Use option access syntax in formulas.

AL Development in Microsoft Dynamics 365 Business Central allows option access syntax for referencing objects throughout the language. Object option access simplifies the reference and readability of code when an ObjectID value is required.

For example, the syntax of the EventSubscriber attribute is
 
[EventSubscriber(ObjectType: ObjectType, ObjectId: Integer, EventName: Text, ElementName: Text, SkipOnMissingLicense: Boolean, SkipOnMissingPermission: Boolean)]
When writing code in AL, you can use either the object number or option access syntax for the object in the ObjectID parameter. I have always wondered why this option has not been possible in formulas property values.
[EventSubscriber(ObjectType::Codeunit, 12, 'OnAfterInitVendLedgEntry', '', true, true)]
or 
 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnAfterInitVendLedgEntry', '', true, true)]

It is much easier on the eyes.

Dynamics 365 Business Central 2022 Wave 2 adds the option to use option access syntax in formulas. Before we had to write

and now we can write

Read more about the feature Use option access syntax in formulas here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/09/use-option-access-syntax-in-formulas/

Dynamics 365 Business Central 2022 Wave 2 – Exclude temporary records when debugging record writes

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2022 Wave 2 has several exciting Development features. One of the exciting features is to Exclude temporary records when debugging record writes.

While debugging in Microsoft Dynamics 365 Business Central, it is often desirable to break on record writes. The BreakOnRecordWrite setting in the Launch configuration determines if the debugger will break on record writes. Setting the BreakOnRecordWrite to true would trigger a break on record writes while debugging.

With the release of Dynamics 365 Business Central Wave 2, a new option – ExcludeTemporary, was added to the BreakOnRecordWrite setting. The BreakOnRecordWrite setting options are:

None (false): Do not break on any record writes.
All (true): Break on all record writes.
ExcludeTemporary: Breaks on record writes for non-temporary tables

Note: the true and false options are available for backward compatibility and may become obsolete. True/False values should be changed to the appropriate new option value.

Read more about the feature Exclude temporary records when debugging record writes here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/09/exclude-temporary-records-when-debugging-record-writes/

It’s Friday – September 16

Permanent link to this article: https://www.dvlprlife.com/2022/09/its-friday-september-16/

Dynamics 365 Business Central 2022 Wave 2 – Choose the report layout on request page

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2022 Wave 2 has several exciting Reporting features. One of the exciting features is to Choose the report layout on request page.

In versions of Dynamics 365 Business Central before 2022 Wave 2, admins specified which layout a report would use for rendering with the Report Layout Selection page. Now, with Dynamics 365 Business Central 2022 Wave 2, users can choose which report layout to use on the request page. This new reporting feature makes it easier for users to select which layout to use, a bonus with the previously introduced Excel layouts.

Read more about the feature Choose the report layout on request page here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/09/choose-the-report-layout-on-request-page/

Dynamics 365 Business Central 2022 Wave 2 – Make entry of variant codes required

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2022 Wave 2 has several exciting Application features. One of the exciting features is to Make entry of variant codes required.

Within Dynamics 365 Business Central, Item Variants are one way to categorize items. For example, you can set up an item, and within that Item, have separate variants by color or size (you can also use item attributes to categorize items) or another characteristic. Item variants allow you to track and manage one Item but still track inventory by the variant.

In versions of Dynamics 365 Business Central before 2022 Wave 2, if item variants existed, it was up to the user to ensure that entry of the variant value on transactions that used an item with variants.

With the release of Dynamics 365 Business Central 2022 Wave 2, it is now possible for administrators to require that users specify the variant code on transactions for items with variants.

There is a new setting on the Inventory Setup, Variant Mandatory if Exists, which specifies the default (global) value that enforces the use of a variant code on transactions for items with variants.

There is also a new setting on the Item, Variant Mandatory if Exists, which can override the default value specified on the Inventory Setup.

Read more about the feature Make entry of variant codes required here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/09/make-entry-of-variant-codes-required/

Dynamics 365 Business Central 2022 Wave 2 – Easily access setup pages for new apps

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2022 Wave 2 has several exciting Development features. One of the exciting features is to  Easily access setup pages for new apps.

In previous “wave” releases of Dynamics 365 Business Central, Microsoft focused on a customer’s onboarding experience. The goal of the onboarding experience is for customers and users to get into and use the application faster and easier. Focus on the onboarding experience also empowers partners to deliver a consistent experience to customers across applications. Partners can provide their applications with checklists, teaching tips, and configuration package artifacts.

As part of the continued effort to enhance the onboarding experience with Business Central 2022 Wave 2, a new menu action was added to the Extension Management page, allowing a developer to specify a page to run to set up the application.

When a developer references a setup page as part of the Guided Experience, it’ll be accessible from the Extension Management for the application.

Read more about the feature Easily access setup pages for new apps here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/09/easily-access-setup-pages-for-new-apps/

It’s Friday – September 09

Permanent link to this article: https://www.dvlprlife.com/2022/09/its-friday-september-09/

Dynamics 365 Business Central 2022 Wave 2 – New command to generate or update AL permission set

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2022 Wave 2 has several exciting Development features. One of the exciting features is to  New command to generate or update AL permission set.

PermissionSets are the core to controlling access within Dynamics 365 Business Central. The Permission Set AL Object was introduced in Dynamics 365 Business Central 2021 Wave 1 and is used to describe the permissions on objects. Before the Permission Set AL Object, Permissions were defined as data, and the AL development language extension had a command to generate the Permission data as an XML file.

The release of Business Central 2022 Wave 2 introduces a new command, al.generatePermissionSetForExtensionObjects, to generate a Permission Set Object for the current project. When invoked, the al.generatePermissionSetForExtensionObjects command creates a new Permission Set Object, or if an existing Permission Set Object exists, it can be selected to update.
The command for generated a XML permission data file has been moved to the al.generatePermissionSetForExtensionObjectsAsXml command. Note that the definition of Permission Sets as data on the list for removal.

Read more about the feature New command to generate or update AL permission set here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/09/dynamics-365-business-central-2022-wave-2-new-command-to-generate-or-update-al-permission-set/

Dynamics 365 Business Central 2022 Wave 2 – Switch companies across environments

With each update of Dynamics 365 Business Central, Microsoft enhances what is often referred to as the base application and enhances the development environment. Dynamics 365 Business Central 2022 Wave 2 has several exciting User experience features. One of the exciting features is to  Switch companies across environments.

Implementations of Dynamics 365 Business Central have more than one company or environment, and some users may need to access or compare data across these companies. The release of Business Central 2022 Wave 2 makes it easier for users to rapidly switch between the environments and companies they have access to.
Users can now see their current environment with a visual cue in the app bar and switch the context by selecting the cue.

Read more about the feature Switch companies across environments here.

Note: The code and information discussed in this article is for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central Public Preview 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/09/dynamics-365-business-central-2022-wave-2-switch-companies-across-environments/