Hi
I like to get the items pictures assigned in Company1 into Company2. This was easy while the Picture field in table Item was BLOB, but now when it is MediaSet I can't to find out how can I do that..
I'm trying with this code:
but nothing happens ... also I'm trying with this:
i can't make to import the pictures in Company2 ...
Does any one know how can I transfer only Picture field from one to another company and how can I check does Picture field has value or not, for example:
Regards
I like to get the items pictures assigned in Company1 into Company2. This was easy while the Picture field in table Item was BLOB, but now when it is MediaSet I can't to find out how can I do that..
I'm trying with this code:
IF Item1.FINDFIRST THEN
REPEAT
Item2.SETRANGE("No.", Item1."No.");
IF Item2.FINDFIRST THEN
BEGIN
Item2.CHANGECOMPANY('Company2');
Item2.Picture := Item1.Picture;
Item2.MODIFY;
END;
UNTIL Item1.NEXT = 0;
but nothing happens ... also I'm trying with this:
IF Item1.FINDFIRST THEN
REPEAT
FileNameExport := 'C:\Temp\' + FORMAT(Item1."No.") + '.jpg';
FileNameImport := 'C:\Temp\' + FORMAT(Item1."No.") + '-1.jpg';
Item2.SETRANGE("No.", Item1."No.");
IF Item2.FINDFIRST THEN
BEGIN
Item2.CHANGECOMPANY('Company2');
Item1.Picture.EXPORTFILE(FileNameExport);
Item2.Picture.IMPORTFILE(FileNameImport , 'Demo Image');
END;
UNTIL Item1.NEXT = 0;
i can't make to import the pictures in Company2 ...
Does any one know how can I transfer only Picture field from one to another company and how can I check does Picture field has value or not, for example:
IF Item1.Picture <> '' THEN ...
does this example for this is ok:
IF Item1.Picture.COUNT > 0 THEN ...
Regards