Skip to main content

Notifications

Small and medium business | Business Central, N...
Unanswered

Format Error in Standard Functionality

Posted on by 30

Hi there we are currently experiencing some bizarre behaviour with the formatting of a decimal variable within standard BC String functionality.

The problem manifests itself within StrSubstNo (also in Message and Error).

It was first noticed in the 'RecordDetails' function within the Approval Entry table.

The line: show below causes the error.

pastedimage1684257006113v1.png

I have added a subscriber to bypass this with the following code:

Snag_5F00_20ece5ab.png

Just for testing - we get the resultant page now displaying.

Snag_5F00_20ee49a0.png

As you can see from the code snippet, if the value is assigned to a local variable, then this is okay... 

There is a new option on the page, to enable us to show the amount firstly, having been assigned in a 'confirm dialogue' then the field is used directly in the 'message' window - and breaks!

pastedimage1684257363636v3.png

pastedimage1684257397751v4.png

pastedimage1684257749871v6.png

I suspect that it has to do with the 'Precision' element of the format string - but we have no control over this... the field itself is a standard field on the Approval Entry table.

pastedimage1684257515929v5.png

I guess it could be something to do with the 'AutoFormatExpression' property,,, but this cannot be the only field using this.

Any help would be gratefully received.. as we don't want to have to bypass all functions where this could possibly happen!

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,104 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans