This post is part of the New Functionality In Microsoft Dynamics 365 Business Central 2025 Wave 1 series in which I am taking a look at the new functionality introduced in Microsoft Dynamics 365 Business Central 2025 Wave 1.
The 16th of the new functionality in the Development section is use new IncStr parameter to change integers by more than 1 in string variables.
For some time you’ve been able to increase a positive number or decrease a negative number inside a string variable by 1 using the IncStr method on Text types. This is useful when handling iterations, for example, involving number series. If you needed to make a change of more than 1, however, you had to write extensive custom logic. To help in these scenarios, the IncStr method now supports a new optional increments parameter to change more than 1.
Enabled for: Admins, makers, marketers, or analysts, automatically
Public Preview: Apr 2025
General Availability: Apr 2025
Feature Details
A new overload of the IncStr
method is added to support an arbitrary increase or decrease of a number in a string variable. This allows for incrementing number series or other similar series by more than one position in one go.
When decreasing a positive number, use a try
function to catch cases where the string can’t be decreased further. Format-wise, when decreasing, leading zeros will be added as applicable.
The example shows incrementing the integer 99 in the AText
string variable to 109 in a single call, by using the new IncStr
method overload with an increment parameter of 10.
Click to show/hide the New Functionality In Microsoft Dynamics 365 Business Central 2025 Wave 1 Series Index
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.