It’s Friday – November 04

Permanent link to this article: https://www.dvlprlife.com/2022/11/its-friday-november-04/

Dynamics 365 Business Central 2022 Wave 2 – Find posted and non-posted document lines in search

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 Find posted and non-posted document lines in search.

With the release of Microsoft Dynamics 365 Business Centra 2022 Wave 2, it is possible to search for posted and non-posted document lines. In the in-product search field, you can search for the following pages, grouped here by document type.

Posted documents:

  • Posted Purchase Invoice Lines 
  • Posted Purchase Receipt Lines
  • Posted Purchase Cr. Memo Lines
  • Posted Sales Invoice Lines
  • Posted Sales Shipment Lines
  • Posted Sales Credit Memo Lines

 

Open documents:

  • Purchase Lines
  • Sales Lines
  • Prod. Order Comp. Lines

Read more about the feature Find posted and non-posted document lines in search 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 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/11/dynamics-365-business-central-2022-wave-2-find-posted-and-non-posted-document-lines-in-search/

Dynamics 365 Business Central: Force Doc. Balance

Microsoft Dynamics 365 Business Central requires that General Journals balance when posting, keeping assets and liabilities balanced. When posting General Journals, they must, at a minimum, balance by “Posting Date.” Microsoft Dynamics 365 Business Central also can force General Journal posting to include both the “Document Type” and “Document Number.”

The “Force Doc. Balance” field on the General Journal Template specifies that transactions posted in the general journal batches for the template should also balance by “Document Type” and “Document Number” in addition to the “Posting Date.”

If you receive the error that your document is out of balance during posting, and that is intentional, you can check the option for the template.

Note: Journal entries are checked in order, and balancing entries must occur in sequence, so you may also need to check your sort!

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 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/11/dynamics-365-business-central-force-doc-balance/

It’s Friday – October 28

Permanent link to this article: https://www.dvlprlife.com/2022/10/its-friday-october-28/

Dynamics 365 Business Central 2022 Wave 2 – IntelliSense for defining sorting on data view properties now includes table keys

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 IntelliSense for defining sorting on data view properties now includes table keys.

IntelliSense not only reduces typographical and syntactical errors but also speeds up development. Developers can evaluate code as they type and use fewer keystrokes to implement particular code. With the release of Microsoft Dynamics 365 Business Central 2022 Wave 2, AL development continues to improve. With this release, a developer can see a list of Keys when specifying the sort for a DataItemTableView or SourceTableView.

I am looking forward to seeing what enhancements come in 2023!

Read more about the feature IntelliSense for defining sorting on data view properties now includes table keys 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 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/10/intellisense-for-defining-sorting-on-data-view-properties-now-includes-table-keys/

Dynamics 365 Business Central 2022 Wave 2 – View size of text, code fields in page inspection

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 View size of text, code fields in page inspection.

The page inspector is a helpful tool allowing users and developers to see page properties, table fields, and data for the selected page. Before the Microsoft Dynamics 365 Business Central 2022 Wave 2, developers needed to review the table structure to find the length of table fields. With the release of Microsoft Dynamics 365 Business Central Wave 2, users and developers can now see the length of text and code fields in the page inspector. The information is displayed as Text[x] or Code[x], where x is the field’s length.

 

Business Central Version 2022 Wave 1 vs Business Central Version 2022 Wave 2

Read more about the feature View size of text, code fields in page inspection 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 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/10/view-size-of-text-code-fields-in-page-inspection/

It’s Friday – October 21

Permanent link to this article: https://www.dvlprlife.com/2022/10/its-friday-october-21/

Dynamics 365 Business Central 2022 Wave 2 – Combine multiple UI actions with a split button

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 Combine multiple UI actions with a split button.

With the release of Microsoft Dynamics 365 Business Central 2022 Wave 2, there is a new button, or, uh, menu, or, uh, menu button in town – the Split Button. A Split Button is a menu group with a drop-down list for the actions and executes the first action as the button action.
 
As part of the new model for promoting menu actions, the ShowAs property of an action group indicates an action group as a Split Button. The order of the actions is defined in code or as rearranged by extensibility or page design.
 
The following code example of an action group display as a Split Button

Demonstrates how the first action is the Split Button action and can also expand to select the additional actions.

Read more about the feature Combine multiple UI actions with a split button 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 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/10/combine-multiple-ui-actions-with-a-split-button/

Dynamics 365 Business Central 2022 Wave 2 – Access database row version from AL code

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 Access database row version from AL code.

Dynamics 365 Business Central 2020 Wave 2 introduced data audit system fields to every table. The audit fields, SystemLastModifiedOn, SystemLastModifiedBy, SystemCreatedBy, and SystemCreatedOn are populated by the platform when a record is created or modified.

With the release of Dynamics 365 Business Central 2022 Wave 2, a global row version number was added to all tables. The platform updates the SystemRowVersion value each time a record is updated. Developers can access this value to query for updated data.

In this example, the SystemRowVersion is displayed on the Customer List Page. When viewing the Customer List Page we can see the values of the audit fields and the version value for the records.

When the Customer is modified, the SystemRowVersion is updated:

Read more about the feature Access database row version from AL code 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 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/10/access-database-row-version-from-al-code/

Dynamics 365 Business Central 2022 Wave 2 – Exclude Try functions when debugging errors

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 Exclude Try functions when debugging errors.

Before Microsoft Dynamics 365 Business Central 2022 Wave 2, when debugging code, developers could determine if the debugger would break on errors by setting the key, BreakOnError, in the launch.json file value to true or false. When debugging code that uses Try functions, this often leads to many unnecessary breaks because, usually, Try functions are designed to cause errors. With the release of Microsoft Dynamics 365 Business Central, developers have new options for the value of the BreakOnError key.

Then options are:
None (false): do not break on errors
All (true): break on all errors
ExcludeTry: break on all errors if they occur outside of the context of a try function

When debugging the following code with the BreakOnError key value set to All, the debugger will break on the error generated within the Try function. If the BreakOnError key is set to ExcludeTry, the debugger will not break on the error within the Try function.

Note: the true and false options are used for backwards compatibility and may become obsolete in the future. It is recommended to use the All and None option values.

Read more about the feature Exclude Try functions when debugging errors 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 2022 Wave 2 online.

Permanent link to this article: https://www.dvlprlife.com/2022/10/exclude-try-functions-when-debugging-errors/