web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Product Image and its relation with InventTable.

(0) ShareShare
ReportReport
Posted on by 66

hi,

I am uploading an image in D365 Released products. The product is getting uploaded via the side formPart of Product image which is getting saved in "EcoResProductImage" table.

I would like to understand how the ecoresproductimage record is referenced to the inventtable of the records against which the image is saved.

Please note that I am not uploading the image via the attachments ribbon but via the side-formPart section , however the record is getting saved in docuref as well.

Q2 ) Also I want to expose this image via an entity however as per my knowledge the records are saved in the azure so we cannot download it.

The ecoresproductimage has the mediumsize image value which can be saved however I would like to understand what the different options available to download it via an entity.

Thanks,

VK

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    238,534 Most Valuable Professional on at

    Look at InventTable.productImage() to see how a product image is retrieved for an InventTable record.

    The entity for product images is EcoResDocumentAttachmentEntity. It doesn't matter which type of storage is used; the entity handles it for you. Or, a bit more precisely, the entity utilizes DocumentManagement class which deals with all the storage providers.

  • vicky1234 Profile Picture
    66 on at

    hi Martin,

    Thanks for the insights.

    So as per the method inventtable.productimage() it seems that the ecoresproductImage table stores the recid of the source table based on how it has been uploaded, but i am still not sure on a perfect relation to apply to fetch the data.

    2) When i query the entity "EcoResDocumentAttachmentEntity" in sql is shows me "328" records.

    Data in table "EcoresproductImage" is 503 records

    Inner join of docuref and EcoresproductImage -> 154 records.

    These variation in the number of records is confusing me whether I should use this entity or not.

    I think the table "EcoresproductImage" also creates records for thumbnails etc which does not have any references to docuref tables.

    I just wanted to understand that is it correct to consider this entity for exporting the product images attached to released products  and that too only the Images uploaded via the form-part section which also stores the values in EcoresproductImage and docuref.

    Do I need to add an additional filter to consider only these records in the entity and if yes then where should i write that part of the code.

    Thanks,

    VK

  • Martin Dráb Profile Picture
    238,534 Most Valuable Professional on at

    Product images may be related to (at least) InventTable, EcoResProduct, InventDimCombination and CatExternalCatalog. Some are default, some not. When counting records, make sure that you're comparing queries with the same filters.

    EcoResDocumentAttachmentEntity returns all attachment, not just product images, therefore its number of records tells you nothing. Consider filtering the result by IsProductImage field.

    I would assume that each record in EcoResProductImage should be related to DocuRef, but it's not guaranteed. Removing a document reference doesn't seem to remove the image.

    Thumbnails aren't separate records in EcoResProductImage, as far as I know. Their seem to be stored in either MediumSize field or ThumbnailSize field.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 605 Super User 2025 Season 2

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 437 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 348 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans