First of all I want say HELLO to everyone because I'm new here.
I'm also new to NAV and C/AL. What I try to accomplish is to make images available via Web Service.
So i create code unit etc. and my question is how can i return such binary data? Under Return Value window only suitable data type is Binary but i don't have idea how to use it. Moreover in C/SIDE Reference Guide i found information that Binary data type is obsolete.
I make some search via Google and I found that BigText can be used, but there is no such type under Return Value window.
I'm using Dynamics Nav 2009 R2.
0
Comments
Now you can fill you bigtext parameter with whatever you need. since you need to pass an image i assume this image is stored in a blob field in a table?
So then you would need to write the data from the blob into a stream then write to the bigtext.
I would recomend having a look at this solutions:
http://blogs.msdn.com/b/freddyk/archive/2008/11/04/transferring-data-to-from-com-automation-objects-and-webservices.aspx
http://kfuglsang.com/post/2011/08/09/Dynamics-NAV-2009-Binary-Data-via-Web-Services-Without-Specialized-COM.aspx
BTW: If you don't want to use automation or com you could use dotnet interop and the StreamReader Class form the .Net Framework
This will give you a string which you can assign to your BigText variable.
Code would looke something like this: