Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Save image of product from CRMon PC

(0) ShareShare
ReportReport
Posted on by 400

       

I take this FETCH but the result does not contain the field enityimage, ...because

     string imageUrlQuery = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
                                     "<entity name='product'>" +
                                    "<attribute name='name'/>" +
                                   "<attribute name='entityimage'/>" +

                                     "</entity>" +
                                     "</fetch>";
                foreach (var single_image in xrm.RetrieveMultiple(new FetchExpression(imageUrlQuery)).Entities)
                {


                    byte[] imageBytes = (byte[])(single_image.Attributes["entityimage"]);
                    MemoryStream ms = new MemoryStream(imageBytes);
                    Image img = Image.FromStream(ms);

                    img.Save("url");


                }

                                                                    

*This post is locked for comments

  • Deepesh161 Profile Picture
    6,317 on at
    RE: Save image of product from CRMon PC

    Here you go: msdn.microsoft.com/.../dn511697.aspx

  • Matteo Riccardi Profile Picture
    400 on at
    RE: Save image of product from CRMon PC

    Ok ... look I'm asking this because I need to take the image from the product; but the field EntityImage_URL returns this url "fidelitysystem1214.crm4.dynamics.com/.../download.aspx;Attribute=entityimage&Id=e1151a9d-d39f-e411-80e1-2c59e549ce38"      and not an image;the field EntityImage, which is an array of bytes is NULLL ... how can I do ???

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans