Currency table Security error when assigning item charges
KYDutchie
Member Posts: 345
Hi all,
I am not sure if this is a bug or I am doing something wrong.
This is my problem. My customer did not purchase the 3760 Multi-currency granule and therefor has no access to the Currency table. They can only use a blank currency code.
They are using Item Charges. But when they try to assign an item charge in the purchase line, they get the error "You do not have permission to read the Currency table." when they enter the Qty to assign.
So I looked at the code in table 5805 "Item Charge Assignment (Purch)". And unlike everywhere else I noticed that the currency code is not checked before reading the currency table. This happens on the "Amount to Assign" Field.
I could get around this problem by coding the Trigger like this:
The version we are working with is the North American NAV 2009SP1.
This problem also exists in Table 5809, "Item Charge Assignment (Sales)".
Now my question is, Is my license incorrect or did I found a small bug here?
Thank you,
Willy
I am not sure if this is a bug or I am doing something wrong.
This is my problem. My customer did not purchase the 3760 Multi-currency granule and therefor has no access to the Currency table. They can only use a blank currency code.
They are using Item Charges. But when they try to assign an item charge in the purchase line, they get the error "You do not have permission to read the Currency table." when they enter the Qty to assign.
So I looked at the code in table 5805 "Item Charge Assignment (Purch)". And unlike everywhere else I noticed that the currency code is not checked before reading the currency table. This happens on the "Amount to Assign" Field.
PurchLine.GET("Document Type","Document No.","Document Line No.");
IF NOT Currency.GET(PurchLine."Currency Code") THEN
Currency.InitRoundingPrecision;
"Amount to Assign" := ROUND("Qty. to Assign" * "Unit Cost",Currency."Amount Rounding Precision");
I could get around this problem by coding the Trigger like this:
PurchLine.GET("Document Type","Document No.","Document Line No.");
IF PurchLine."Currency Code" <> '' THEN BEGIN
IF NOT Currency.GET(PurchLine."Currency Code") THEN
Currency.InitRoundingPrecision;
END ELSE
Currency.InitRoundingPrecision;
"Amount to Assign" := ROUND("Qty. to Assign" * "Unit Cost",Currency."Amount Rounding Precision");
The version we are working with is the North American NAV 2009SP1.
This problem also exists in Table 5809, "Item Charge Assignment (Sales)".
Now my question is, Is my license incorrect or did I found a small bug here?
Thank you,
Willy
Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
0
Answers
-
check and see if somebody has inserted a record into the currency table.
If there is record, delete it with dev license.0 -
ANd make sure that developers NEVER use a developer license in a live environment. :whistle: :whistle: :whistle:David Singleton0
-
Thanks guys,
There were no records in the currency table, I made sure. Putting the If statement around the native code fixes the problem.
I just hope that no more "bugs" exist. But that is what testing is for right?
Thanks all.
Regards,
Willy
PS,
David.
If one of our developers leaves our license anywhere on a customer's server, they will have an issue with me!
Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.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
- 322 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

