Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7644587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:43:35+00:00 2026-05-31T09:43:35+00:00

I’m trying to sync data from a CRM server back to a separate service,

  • 0

I’m trying to sync data from a CRM server back to a separate service, and am going about this via a CRM Plugin. This works for most cases but on the Update Event on a Contact entity I’m running into issues.

The external service requires all fields to be synced at the same time, but the update event only supplies the changed fields, so I add a PreImage for the Contact event. as detailed here

This provides the some of the fields for the Contact Entity but some are still missing. Address fields are removed with a link to an AddressID, but there are still fields in the Contact Entity which don’t seem to be supplied to the plugin.

The salutation, email1, telephone1 fields all appear to missing. The fields are listed in the plugin registration tool’s preImage UI, but they’re not showing up in what’s supplied to the code.

How do I go about accessing them?

<PreEntityImages xmlns:a="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:b="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <a:KeyValuePairOfstringEntitygUGIFE1S>
        <b:key>UpdateContactPreImage</b:key>
        <b:value>
            <a:Attributes>
                <a:KeyValuePairOfstringanyType>
                    <b:key>customertypecode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>mobilephone</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:string">mobile</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>merged</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>territorycode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>haschildrencode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>exchangerate</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:decimal">1.0000000000</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>preferredappointmenttimecode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>address2_addresstypecode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>isbackofficecustomer</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>owningbusinessunit</b:key>
                    <b:value i:type="a:EntityReference">
                        <a:Id>250293c1-99fe-e011-b93d-0019b9f1ed44</a:Id>
                        <a:LogicalName>businessunit</a:LogicalName>
                        <a:Name i:nil="true"/>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>owninguser</b:key>
                    <b:value i:type="a:EntityReference">
                        <a:Id>081693c1-99fe-e011-b93d-0019b9f1ed44</a:Id>
                        <a:LogicalName>systemuser</a:LogicalName>
                        <a:Name i:nil="true"/>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>lastname</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:string">[test] Last Name</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>donotpostalmail</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>donotphone</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>preferredcontactmethodcode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>educationcode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>ownerid</b:key>
                    <b:value i:type="a:EntityReference">
                        <a:Id>081693c1-99fe-e011-b93d-0019b9f1ed44</a:Id>
                        <a:LogicalName>systemuser</a:LogicalName>
                        <a:Name>System Administrator</a:Name>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>customersizecode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>firstname</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:string">[test] First Name 14/03/2012 9:56:54 AM</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>yomifullname</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:string">
[test] First Name 14/03/2012 9:56:54 AM [test] Last Name
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>address2_shippingmethodcode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>donotemail</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>fullname</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:string">
[test] First Name 14/03/2012 9:56:54 AM [test] Last Name
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>address1_addressid</b:key>
                    <b:value xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/" i:type="c:guid">f1091577-68ca-4e47-8af0-062433964799</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>address2_freighttermscode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>statuscode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>createdon</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:dateTime">2012-02-20T05:02:03Z</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>donotsendmm</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>donotfax</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>leadsourcecode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>address1_country</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:string">0</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>creditonhold</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>telephone2</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:string">homephone</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>shippingmethodcode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>1</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>telephone1</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:string">businessphone</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>transactioncurrencyid</b:key>
                    <b:value i:type="a:EntityReference">
                        <a:Id>c5d4dc22-9afe-e011-b93d-0019b9f1ed44</a:Id>
                        <a:LogicalName>transactioncurrency</a:LogicalName>
                        <a:Name>Australian Dollar</a:Name>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>donotbulkemail</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>modifiedby</b:key>
                    <b:value i:type="a:EntityReference">
                        <a:Id>081693c1-99fe-e011-b93d-0019b9f1ed44</a:Id>
                        <a:LogicalName>systemuser</a:LogicalName>
                        <a:Name>System Administrator</a:Name>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>createdby</b:key>
                    <b:value i:type="a:EntityReference">
                        <a:Id>081693c1-99fe-e011-b93d-0019b9f1ed44</a:Id>
                        <a:LogicalName>systemuser</a:LogicalName>
                        <a:Name>System Administrator</a:Name>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>contactid</b:key>
                    <b:value xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/" i:type="c:guid">e5f28440-7f5b-e111-b93d-0019b9f1ed44</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>modifiedon</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:dateTime">2012-03-13T23:56:55Z</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>participatesinworkflow</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>statecode</b:key>
                    <b:value i:type="a:OptionSetValue">
                        <a:Value>0</a:Value>
                    </b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>address2_addressid</b:key>
                    <b:value xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/" i:type="c:guid">6c3024e7-5eba-4394-9192-e7106db17c0e</b:value>
                </a:KeyValuePairOfstringanyType>
                <a:KeyValuePairOfstringanyType>
                    <b:key>donotbulkpostalmail</b:key>
                    <b:value xmlns:c="http://www.w3.org/2001/XMLSchema" i:type="c:boolean">false</b:value>
                </a:KeyValuePairOfstringanyType>
            </a:Attributes>
            <a:EntityState i:nil="true"/>
            <a:FormattedValues>
                <a:KeyValuePairOfstringstring>
                    <b:key>customertypecode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>merged</b:key>
                    <b:value>No</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>territorycode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>haschildrencode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>exchangerate</b:key>
                    <b:value>1.0000000000</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>preferredappointmenttimecode</b:key>
                    <b:value>Morning</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>address2_addresstypecode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>isbackofficecustomer</b:key>
                    <b:value>No</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>donotpostalmail</b:key>
                    <b:value>Allow</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>donotphone</b:key>
                    <b:value>Allow</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>preferredcontactmethodcode</b:key>
                    <b:value>Any</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>educationcode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>customersizecode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>address2_shippingmethodcode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>donotemail</b:key>
                    <b:value>Allow</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>address2_freighttermscode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>statuscode</b:key>
                    <b:value>Active</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>createdon</b:key>
                    <b:value>2012-02-20T15:02:03+10:00</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>donotsendmm</b:key>
                    <b:value>Send</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>donotfax</b:key>
                    <b:value>Allow</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>leadsourcecode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>creditonhold</b:key>
                    <b:value>No</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>shippingmethodcode</b:key>
                    <b:value>Default Value</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>donotbulkemail</b:key>
                    <b:value>Allow</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>modifiedon</b:key>
                    <b:value>2012-03-14T09:56:55+10:00</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>participatesinworkflow</b:key>
                    <b:value>No</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>statecode</b:key>
                    <b:value>Active</b:value>
                </a:KeyValuePairOfstringstring>
                <a:KeyValuePairOfstringstring>
                    <b:key>donotbulkpostalmail</b:key>
                    <b:value>No</b:value>
                </a:KeyValuePairOfstringstring>
            </a:FormattedValues>
            <a:Id>e5f28440-7f5b-e111-b93d-0019b9f1ed44</a:Id>
            <a:LogicalName>contact</a:LogicalName>
            <a:RelatedEntities/>
        </b:value>
    </a:KeyValuePairOfstringEntitygUGIFE1S>
</PreEntityImages>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:43:36+00:00Added an answer on May 31, 2026 at 9:43 am

    Do the fields which appear to be missing have a value? If the fields are not populated (e.g. Have a null value) then they will not be part of the image attribute collection. If that is the case then you will likely want to check for their presence before query them with something like:-

    if(!preImage.Attributes.Contains("myAttributeName"))
    {
    
    }
    

    If that is not the case, then perhaps you could post some more details of the entity which is firing the plug in so I can get an idea of the data being queried here.

    Thanks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
I am currently running into a problem where an element is coming back from
I have some data like this: 1 2 3 4 5 9 2 6
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.