Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Product Image and its relation with InventTable.

(0) ShareShare
ReportReport
Posted on by 64

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

  • Martin Dráb Profile Picture
    Martin Dráb 230,540 Most Valuable Professional on at
    RE: Product Image and its relation with InventTable.

    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.

  • vicky1234 Profile Picture
    vicky1234 64 on at
    RE: Product Image and its relation with InventTable.

    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

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,540 Most Valuable Professional on at
    RE: Product Image and its relation with InventTable.

    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.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,861 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,540 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans