procedure GetItemImage(itemNo: Code[20]) Result: Text var Item: Record Item; TenantMedia: Record "Tenant Media"; TempBlob: Codeunit "Temp Blob"; PictureInStream: InStream; base64cnv: Codeunit "Base64 Convert"; begin if Item.Get(itemNo) then begin if Item.Picture.Count = 0 then exit(''); if TenantMedia.Get(Item.Picture.Item(1)) then begin TenantMedia.CalcFields(Content); if TenantMedia.Content.HasValue then begin TenantMedia.Content.CreateInStream(PictureInStream); Result := base64cnv.ToBase64(PictureInStream, true); end; end; end; end;
Answers
You can use this function
Regards
Thank you very much. It works fine!
Best regards,
Morten
https://rockwithnav.wordpress.com/2019/05/01/item-picture-webservice/
https://rockwithnav.wordpress.com/2019/08/02/consume-nav-service-get-item-picture/
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/