I don’t know how to import image from my computer into Page of NAV2013
I try to insert some code but it didn’t work
IF EXISTS (‘D:\Work\ABCDE.BMP’) THEN
BEGIN
Rec.Picture.IMPORT(‘D:\Cartoons\ABCDE.BMP’,FALSE);
Rec.CALCFIELDS(Picture);
END;
and when i ran the program it said ‘The IMPORT() method is obsolete. Page View - Company Card must close.’.
so I didn’t know which way to pull them to show up on the Page.
Thank for your help
Chaiyakorn
Welcome to DUG
Do you want to do it via coding only? not manually?
Hello Mohana. Thank you for your reply
Actually I want to learn both of coding and not manually ways. Could you advice to me please. [:)]
admin1
August 8, 2013, 9:37am
4
Hi Chaiyakorn,
The import/export functions are not supported in NAV 2013. Instead you must use:
CREATEINSTREAM Function (BLOB)
CREATEOUTSTREAM Function (BLOB)
Also you should avoid writing actual code directly in your page object. Instead put the code into a codeunit or keep it as a function in the related table.
it didn’t work. I couldn’t take that picture to show on Page in RTC [:’(]
anyway if it’s possible please teach me at the begin of import image please
P.S. I’m a new of this program so I didn’t know about this program well, please advice me.
You can look at Page 1 - company information
There is a picture box and how it is working…
I still can’t do it,
Now I try to use function UPLOADINTOSTREAM but I didn’t know how to use it well.
P.S. I want to use the image from My Computer, not in NAV 2013 Database so I must use data type BLOB to keep the image file but I can’t find it in data type.
admin1
September 8, 2013, 3:36pm
9
Did you manage to find a solution?
I still can’t do it,
Now I try to use function UPLOADINTOSTREAM but I didn’t know how to use it well.
P.S. I want to use the image from My Computer, not in NAV 2013 Database so I must use data type BLOB to keep the processed image file but I can’t find it in data type.
There are directions on inserting image with NAV 2013.