I'm still going through an upgrade process, and for the current database have exported the objects as text, run them through the conv-ml tool and am currently trying to import it back into Navision, fixing the errors on the way when this error appeared about 15 minutes ago and I cannot work it out at all.
Hay un error sintáctico en la importación en la línea 326903 en la posición 25:
OnPostDataItem=BEGIN.
El código AL no tiene la misma indentación que la primera línea
In English that would be something such as:
There is a syntax error in importing line 326903 in position 25
OnPostDataItem=BEGIN.
The AL code does not have the same indentation as the first line.
Has anyone come across this before or got a clue what this means? Looking at the text object file, there doesn't seem to be anything wrong.
0
Comments
open this txt file in editor, go to line no 25
this line probably started from the begining of line.
You must insert few space before line.
Check intendation of other trigger and set the same for your error line
Regards
Thanks for the reply, but this is what I do not understand, the error is occuring on line 326903, a custom built report 50077, where would position 25 be?
Surely it cannot mean line 25 of the whole file, that reads:
Text005 : TextConst 'ESP="HOY"';
a text constant of CodeUnit1
Indentation in this case does not refer to the number of spaces on the line in question, it refers to the level of logical indentation between {}
In this case, and after solving it, the error also appears in other objects later in the file, the original programmer of the custom objects in this database has been placing comments using {...comment...} inside expressions. This leads to the real error actually being created 100 lines previously than the reported line number, with the real the error being in the code of the previous trigger, yet only after running the conv-ml tool, because it was fine before then.
This strange use of comments inside expressions (100 or so lines before the reported error line)
has clearly caused the conv-ml tool to become very confused, as it totally destroyed the 4th line shown above, turning it into:
Obviously leaving an open curly brace with no ending curly brace. The import did not like this for obvious reasons.
I think the moral of this tale is never to use block comments inside expressions.
Actually the problem is not in indentation. It's just a sintax error in any line before the line number that error message shows.
That is exactly true, what 'fcrespo' wrote. For instance, in my case I was missing an 'END;' statement in the middle of the object. Had to exclude the code piece-by-piece to realize what leads to the issue.