Hi All,
is it possible to find the size of the file in Navision?
Senario:
I did a customization for attaching documents. So at the time of selecting a particular file, I just want to know the size of the file to restrict.
any idea....
Thanks
G. Madhan
0
Comments
Hope this helps
Thomas
If I understand you correctly - are you asking what the maximum file size that can be store in Nav. If so and assuming you are storing as a blob.
From the help:
Another solution is to store a link to the document in the record link table and hyperlink to it to view.
Hope this helps.
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
Did you find the solution for the file size?
Here I have also the same problem. I want to store the Imported file
size in the table field. So Please help me regarding this issue if you can.
Thanks in Adv.
Ahmedabad, Gujarat, India
E Mail : ravi.thakkar@hotmail.com
Use this function to return the length of an ASCII or binary file.
Length := File.LEN
Length
Data type: integer
This tells you the length of the file in bytes.
File
Data type: file
Use this variable to refer to the file.
Good Luck
Attain Navision
Actually I wanted to make my code More efficient. So I did this post.
The code which I had written was...
FileG.RESET;
FileG.SETRANGE(Path,FlPath);
FileG.SETRANGE("Is a file",TRUE);
FileG.SETFILTER(Name,'%1','*.*');
IF FileG.FINDFIRST THEN BEGIN
REPEAT
IF FileG.Name = FlName THEN
"File Size" := FileG.Size;
UNTIL FileG.NEXT = 0;
END;
Using it I was able to satisfy my requirement..
But the code which you wrote works very well and also very efficient...
Thanks a Lot.
Ahmedabad, Gujarat, India
E Mail : ravi.thakkar@hotmail.com
also added, when using File variable always CLOSE it in the end of process..