Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

CRM Update Query : Updating "entityimage" Attribute in a contact

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I am trying to update entityimage attribute using BizTalk and I need some help. however, I could update all other fields in a contact entity using BizTalk. 

I use BizTalk to prepare CRM update query and I invoke SOAP Action header to update details in CRM.(Action="schemas.microsoft.com/.../Update" />) 

One of My update query that worked

    <Update xmlns="schemas.microsoft.com/.../Services">
      <entity xmlns:b="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance">
        <b:Attributes xmlns:c="schemas.datacontract.org/.../System.Collections.Generic">

            <b:KeyValuePairOfstringanyType>
              <c:key>CustomerID</c:key>
              <c:value i:type="d:string" xmlns:d="www.w3.org/.../XMLSchema">70472441</c:value>
            </b:KeyValuePairOfstringanyType>

            <b:KeyValuePairOfstringanyType>
              <c:key>lastname</c:key>
              <c:value i:type="d:string" xmlns:d="www.w3.org/.../XMLSchema">ClarkUpdated</c:value>
            </b:KeyValuePairOfstringanyType>

        </b:Attributes>
        <b:EntityState i:nil="true"/>
        <b:FormattedValues xmlns:c="schemas.datacontract.org/.../System.Collections.Generic"/>
        <b:Id>907fd352-cc96-e611-80e9-5065f38bc5a2</b:Id>
        <b:KeyAttributes xmlns:c="schemas.microsoft.com/.../Contracts" xmlns:d="schemas.datacontract.org/.../System.Collections.Generic"/>
        <b:LogicalName>contact</b:LogicalName>
        <b:RelatedEntities xmlns:c="schemas.datacontract.org/.../System.Collections.Generic"/>
        <b:RowVersion i:nil="true"/>
      </entity>
    </Update>


I am trying to use the same Update query to get the images updated. But failing to do so. Probably I am not using right value/data type. I am aware data should be in Bye[] but can someone help me get through it. 

I receive image in base64 string format and I am converting it into Byte[] but struggling to prepare CRM update query.

If you can give me a sample update query to update entityimage would really help. Let me know if you need more details. Thanks in advance. 

cheers,

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans