Hello,
I have a code unit that writes some data to a file using a BigText variable. The code runs fine in the classic client but when I run the same code from the role tailored client I run into some problems when working with the BigText variable. Here are the errors I'm getting...
The line that is causing the error is:
"BigTextVariable".AddText('some text');
I get the following error:
Compilation of module '...' failed. This could be caused by differences between binaries in your installation or your database. Enusre that all installation components are consistent and up to date. Error details: The best overloaded method match for 'Microsoft.Dynamics.Nav.Runtime.NavBigText.ALAddText(Microsoft.Dynamics.Nav.Runtime.NavBigText, string)' has some invalid arguments: error CS1503: Argument '2': cannot convert from 'byte' to 'string'.
So I commented that line and tried to write the empty BigText variable to the file like this:
"My File".WRITE("BigTextVariable");
In this case, I get the following error:
ALStream.ALWrite, invalid stream mode: FileText
Any ideas on what might be going wrong? This code is working just fine in the classic client. Any ideas would be greatly appreciated.
Thanks,
Adam
0
Answers
I have a feeling of dejavu when I saw this, but I cannot find the error.
I think you should try replacing this:
"BigTextVariable".AddText('some text');
with
strvar := 'some text';
"BigTextVariable".AddText(strvar);
and see whether that fixes your problem.
Reg. the write, I think you need to use
"BigTextVariable".WRITE(OutStream)
on an OutStream you have created based on the file - when writing a BigText to a file.
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
That also worked perfectly, thanks again!