Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

Retrieve image fields from contact and save to sql db

Posted on by 65

Hi

I am trying to retrieve contact picture(byte[]) and save to azure sql db.

I have tried Data Export Service but these type of entity image fields are not supported. So, trying to write console app.

Please see my code below

pastedimage1668001924409v1.png


The code is working but entityimage is inserted as 0x53797374656D2E427974655B5D for all contacts.

Why is it? Where did I do mistake?

Is this the correct way?

Regards

  • rajkm Profile Picture
    rajkm 65 on at
    RE: Retrieve image fields from contact and save to sql db

    Thanks, it worked

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,063 Moderator on at
    RE: Retrieve image fields from contact and save to sql db

    I didn't test but the code should be

    byte[] byteData = a["entityimage"] as byte[];

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans