Hi Everyone,
On Released Products, we can upload multiple product images. And can keep any one as default one.
This image gets attached in attachment section as shown below,

Now when we click on "Open", the image gets downloaded. When I debugged code, and copied the logic in Runnable class as below, I am able to download the image when that Runnable class excutes.
public static void main(Args _args)
{
InventTable inventTable = InventTable::find("1030");
EcoResProductImage ecoResProductImage;
DocuRef defaultDocuRef;
defaultDocuRef = EcoResProductImage::findDefaultImageDocuRef(inventTable);
str displayUrl = DocumentManagement::getAttachmentPublicUrl(defaultDocuRef);
Info(strFmt("%1",displayUrl));
new Browser().navigate(displayUrl, false, false);
}
When I am printing "displayURL" variable mentioned in above code, I am getting URL in below format,
filemanagement/7319160f-ecc4-435a-bf09-1d9823860f40?access_token=eyJDb21wYW55IjoiU01TQSIsIkhhc2hlZFRva2VuIjoiUGpZV1dkQVZ2UkNtK1lqVDhQTmF0TUxlb3RxZVh4REVleWtxdXhPNUVGSEFHcG14UThHQ1FoRnZtbWk1Z1VwYzRoUTV1THBQK1FLeVRSYjJ3WGtZQkE9PSIsIlBhcnRpdGlvbiI6NTYzNzE0NDU3NiwiVXNlcklkIjo1NjM3MjExMzI3LCJWYWxpZFVudGlsIjoiXC9EYXRlKDE2MjM4NDIyNjA2NjcpXC8iLCJGaWxlSWQiOiI3MzE5MTYwZi1lY2M0LTQzNWEtYmYwOS0xZDk4MjM4NjBmNDAifQ==&ms-dyn-caid=6218636d-9551-4xx8-b1e3-971451fxxxx
Also in DocuValue table, AccessInformation field has value as,
csaXXXX2dfo45f76547a947d.blob.core.windows.net/.../7319160F-ECC4-435A-BF09-1D9823860F40
My requirement is, I need to share the URL to 3rd party so that they can download the same product image. Can anyone suggest how this can be achieved?
Browser class of D365F&O easily process this URL and I can download the file by using below code, and I could not figure out how it's processing in Browser class.
new Browser().navigate(displayUrl, false, false);
But, how any other software can make use of above URL to download the same image? Is it possible to test the URL using POSTMAN?