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?
Answers
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.
> 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 Monday
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)
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.
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:
can you reinstall the Development Environment?
I have tried the SQL backup in different Dockers too and same error comes
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 too
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 )