AutoFormatExpr

Prontiol
Member Posts: 10
Hi there!
What defines autoformat rules when no currency is entered in the field, which is used as AutoformatExpr? Help says then LCY is used, when Currency is empty, but how do i change formatting rules for LCY?
Thanks in advance
What defines autoformat rules when no currency is entered in the field, which is used as AutoformatExpr? Help says then LCY is used, when Currency is empty, but how do i change formatting rules for LCY?
Thanks in advance
0
Comments
-
How to find the answer:
Pres F1. There is written:When you use the AutoFormatType and AutoFormatExpr properties to format a field, a trigger called AutoFormatTranslate in CodeUnit 1 is called. AutoFormatTranslate has ID 12 and takes two parameters; one from the AutoFormatType property and one from the AutoFormatExpr property. The AutoFormatType property contains an integer (0, 1 or 2) and the AutoFormatExpr property contains text (“ =LCY”).... CASE AutoFormatType OF 1: // Amount IF AutoFormatExpr = '' THEN EXIT(STRSUBSTNO(Text012,GLSetup."Amount Decimal Places")) ELSE BEGIN IF Currency.GET(AutoFormatExpr) AND (Currency."Amount Decimal Places" <> '') THEN EXIT(STRSUBSTNO(Text012,Currency."Amount Decimal Places")) ELSE EXIT(STRSUBSTNO(Text012,GLSetup."Amount Decimal Places")); END; 2: // Unit Amount IF AutoFormatExpr = '' THEN EXIT(STRSUBSTNO(Text012,GLSetup."Unit-Amount Decimal Places")) ELSE BEGIN IF Currency.GET(AutoFormatExpr) AND (Currency."Unit-Amount Decimal Places" <> '') THEN EXIT(STRSUBSTNO(Text012,Currency."Unit-Amount Decimal Places")) ELSE EXIT(STRSUBSTNO(Text012,GLSetup."Unit-Amount Decimal Places")); END; 10: EXIT('<Custom,' + AutoFormatExpr + '>'); END;
Are you able to see, which table and which field is used when AutoFormatExpr is empty? :whistle:
As you can see, it is easy to find the answer, do not be afraid to try it. :-)
If you have no enough rights to open the CU1, answer is: G/L Setup is used.0 -
Thanks, kine! Your answer is correct, but my question probably wasn't clear enough.
I have configured default rounding in "General Ledger Setup" table, but I was just unable to enter more than 5 decimal places.
Navision says in a message box: "Field can not have more than 5 decimal places" and that's all. It looks like there is "DecimalPlaces" property is set to "2:5" in this field, but it has "<default>" value.
There is a "Decimal Places" configuration for every currency in the "Currency" table, and it works well, when "Currency code" field is not empty. But when it is empty, it uses some default configuration (LCY currency) but where can I set up this default one?0 -
As I wrote: in cases of local currency the G/L setup table is used. Mainly the fields:
Amount Decimal Places
Unit-Amount Decimal Places0 -
Oh, my fault.
Setting "Unit-Amount Decimal Places" to "2:6" in "General Ledger Setup" solved the problem.
Thank you, kine.0 -
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions