Dimension not validating in rtc

Kisu
Member Posts: 381
I've come up with a odd problem, I've old dataport that imports purchase invoices and its been working fine in classic sql client,
now I made a page for that port and do the import again, it gives me this error:
"xxx is not an available code for that dimension"
It works fine if I REM the dimension validation part of the code and all data comes in except the dimension.
This works without REM on classic client. We've triple checked the dimensions and they are good, as stated they work fine with classic side.
Anyone come up with this kind of error?
now I made a page for that port and do the import again, it gives me this error:
"xxx is not an available code for that dimension"
It works fine if I REM the dimension validation part of the code and all data comes in except the dimension.
This works without REM on classic client. We've triple checked the dimensions and they are good, as stated they work fine with classic side.
Anyone come up with this kind of error?
K.S.
0
Comments
-
Okay it tries to validate global dimension 1 with global dimension 2 code somehow. This is realy odd as it validates them correctly in classic client.
I'm really loosing my hair with this, I even made temp table to see the dimension values come correctly from the file.
](*,) ](*,)K.S.0 -
Correct me if I'm wrong, but the RTC doesn't support dataports... only XMLports.0
-
aseigle wrote:Correct me if I'm wrong, but the RTC doesn't support dataports... only XMLports.
Yes its xmlport and port works correctly, it brings all the data to temptable and I'm populating the invoice fields from there.
Process
xml file -> xml port -> temp table -> invoice header creation from temp table -> invoice line creation from temp table for that invoice -> invoice line dimension validation
on the temp table global dimension 1 and 2 are in separate colums and when I validate the dimension in classic client it does it right way.
I create the line before I populate the amounts and other stuff:txtPurchaseLine.INIT; txtPurchaseLine."Document Type" := txtPurchaseLineTemp."Document type"; txtPurchaseLine."Document No." := txtPurchaseLineTemp."Document No"; txtPurchaseLine."Line No." := txtPurchaseLineTemp."Line No"; txtPurchaseLine.INSERT(TRUE);
After everything else I call the dimension validation, if there is value in the temp table (this is where it works or not depending the client) :-kIF txtPurchaseLineTemp."Global Dimension 1" <> '' THEN txtPurchaseLine.VALIDATE("Shortcut Dimension 1 Code", txtPurchaseLineTemp."Global Dimension 1"); IF txtPurchaseLineTemp."Global Dimension 2" <> '' THEN txtPurchaseLine.VALIDATE("Shortcut Dimension 2 Code", txtPurchaseLineTemp."Global Dimension 2"); txtPurchaseLine.MODIFY(TRUE);
K.S.0 -
It seems to work like this somehow and I'm not sure why does it work without using VALIDATE() -function?
Does Modify(TRUE) call the validation when the field is populated. Why there is no word of this in the nav manualstxtPurchaseLine."Shortcut Dimension 2 Code" := txtPurchaseLineTemp."Global Dimension 2";
on the page itself there is no validation call for the shortcut 1 and 2 but in its table there is same as the other shortcuts have on page trigger. ](*,)K.S.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