1

I am currently mapping a related entity from Dynamic CRM to Sitecore using DXF

enter image description here

Iam getting this message when I run the batch pipelines.

enter image description here

What is the proper configuiration when mapping a related entity to an account that is not directly under the account? This is my sample schema from Dynamic CRM

<fetch>
  <entity name="contact">
    <attribute name="fullname" />
    <attribute name="telephone1" />
    <attribute name="lastname" />
    <order attribute="fullname" descending="false" />
    <filter type="and">
      <condition attribute="lastname" operator="not-null" />
    </filter>
    <link-entity name="loyaltyscheme" from="id1" to="id2" visible="false" link- 
      type="outer" alias="a_0151c8f511fd">
      <attribute name="totalnumberofproductregistrations" />
      <attribute name="fiscalyear" />
    </link-entity>
  </entity>
</fetch> 

Thanks!

  • I've not used the CRM provider specifically, but when I've run into stuff like this I have found decompiling the provider and looking at the step processors to be very helpful. – Dan Sinclair Jul 10 at 13:31
  • hi, where can i see the decompiling of provider in sitecore? in logs? – jdmentolaroc Jul 11 at 7:44
  • 1
    You need to use tools like dotPeek or ILSpy to decompile provider dll that you can find under bin folder @jdmentolaroc – Peter Procházka Jul 11 at 7:50
2

For the Aliased Values read from Dynamics you need to read AliasedValue(yourProperty).Value
You can read more on DCRM linked entities here:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.xrm.sdk.query.linkentity?view=dynamics-general-ce-9

So basically what you need to do is:
1. Create Value Accessor Set for your linked entity under

/Data Access/Value Accessor Sets/Providers/Dynamics


2. Create Linked entity under

/Tenant Settings/Providers/Dynamics/Link Entities/

Fill all required fields,
add alias "myent" to it, for example, add previously created Accessor Set to identify field names to read

3. Then create ADDITIONAL Value Accessor Set for your entity under
/Data Access/Value Accessor Sets/Providers/Dynamics but now, in field "Attribute Name" add aliased field names in format "myent.myfield"

4. Create "Property Value Reader" under Value Readers, set "Property Name" to "Value" - you will use it to read AliasedValue(myent.myfield).Value

5. Now create Mapping, use Value Accessor from p.3 as a Source Accessor, and Value Reader from p.4 as Value Transformer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.