Type conversion is not possible Text + Integer

Berno_S
Member Posts: 21
I'm trying to compile some runtime upgraded object 2009->2013->2015->2016 and i get this error
But Counter is Integer and not a text, even if I delete it as a variable and add it again the error comes back, this counter is printed multiple times in this report, so making a new variable with a new name is not optimal for this solution.
Does anyone have clue to how solve this and/or know why it comes?

But Counter is Integer and not a text, even if I delete it as a variable and add it again the error comes back, this counter is printed multiple times in this report, so making a new variable with a new name is not optimal for this solution.
Does anyone have clue to how solve this and/or know why it comes?
0
Best Answers
-
Hello Berno_S,
the Function ImportData is a built-in function, that's probably why it isn't working with the Parameter.
So at the end you are not using your ImportData Function, but the built-in function.
See here:
https://docs.microsoft.com/en-us/dynamics-nav/importdata-function--database-
The other problem, as already mentionend from irasoelbaks, it would be helpful if you can export the file. If you can export it as ".txt" you can use Pastebin and share the link here.
0 -
Since this seems to be a system with modifications there are other things to check.
Is there by any chance a text field in table Sales Header named Counter or a function Counter returning Text in Sales Header?0 -
I would try
Rec.RecordID := RecRef.RECORDID;
(Actually I checked the code for Page 99009049 in a LS-Retail system in BC14 which I have access to to make this suggestion)
0
Answers
-
I can reproduce the error you get:
Cause: datatype of Counter is Text and should be Integer. Did you declared Counter as Text? Please check and share the results here so someone can check it double.
0 -
As per question it is an integer and this is why I'm asking. Btw it's a global and no local variables are defined, so it's not a global vs. local issue0
-
Please send me the fob or with the isolated code then I will check it for you.0
-
> @irasoelbaks said:
> Please send me the fob or with the isolated code then I will check it for you.
Will make an fob when I'm back on the office Monday0 -
Just had nother task so a little delayed, I tried to make a fob and a txt of the objects, but I'm not allow to attach here. So I can only show you in pics
0 -
Also show the locals in the specified trigger please0
-
there are non0
-
another "funny" compilation error after runtime upgrade is 2 functions have parameter placement changed etc.
func1(text,boolean) compiles in 2013, but not in 2016
error text = boolean
if I change it to:
func1(boolean,text) it compiles in 2016
but going to the function in the code it still show as if the parameters has to be (text,Boolean)
0 -
Hello Berno_S,
the Function ImportData is a built-in function, that's probably why it isn't working with the Parameter.
So at the end you are not using your ImportData Function, but the built-in function.
See here:
https://docs.microsoft.com/en-us/dynamics-nav/importdata-function--database-
The other problem, as already mentionend from irasoelbaks, it would be helpful if you can export the file. If you can export it as ".txt" you can use Pastebin and share the link here.
0 -
Hello Berno_S,
the Function ImportData is a built-in function, that's probably why it isn't working with the Parameter.
So at the end you are not using your ImportData Function, but the built-in function.
See here:
https://docs.microsoft.com/en-us/dynamics-nav/importdata-function--database-
The other problem, as already mentionend from irasoelbaks, it would be helpful if you can export the file. If you can export it as ".txt" you can use Pastebin and share the link here.
Ahh I see so because this is now an integrated function i NAV 2016 but was not in 2013 R2 this gives a some funny errors.
Here's the first problem:
https://pastebin.com/v6Dw5PTE
I just checked the Importdata function and see that has changed to capital letters so I will have to the custom object from the solution ment to run on 2016 and not the runtime upgraded one.0 -
Thank you. The part with the Counter is working at my side. Can you recompile the object and try it again?
If that doesn't work remove the counter variable and add it again.
I think you have to rename the function, the capital letters shouldn't matter. As far as i know it shouldn't matter if you type ImportData or ImPORTdatA, the result is the same.
0 -
Thank you. The part with the Counter is working at my side. Can you recompile the object and try it again?
If that doesn't work remove the counter variable and add it again.
I think you have to rename the function, the capital letters shouldn't matter. As far as i know it shouldn't matter if you type ImportData or ImPORTdatA, the result is the same.
I have tried recompile and also remove and add it again, same error.
I'll just have to change the name for the variable
Letter Case is not important, but if it becomes all upper case it's a sign that it's an integrated function, so the fix is as you say to rename the function, but this must have been done in a newer version of the module, so I'll take this object. the Counter stuff is the strange one.
and now also this:0 -
That's strange,
can you reinstall the Development Environment?0 -
Since this seems to be a system with modifications there are other things to check.
Is there by any chance a text field in table Sales Header named Counter or a function Counter returning Text in Sales Header?0 -
Since this seems to be a system with modifications there are other things to check.
Is there by any chance a text field in table Sales Header named Counter or a function Counter returning Text in Sales Header?
You where correct never thougt about that and it was added after the first runtim upgrade from 2009 to 2013 R2, so this the report has not been compiled since the field was added and must not have been used after either.
Now it's all starting to get together do you have a bid on the recref error too0 -
I would try
Rec.RecordID := RecRef.RECORDID;
(Actually I checked the code for Page 99009049 in a LS-Retail system in BC14 which I have access to to make this suggestion)
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