This project has moved. For the latest updates, please go here.

Use with case entity.

Jan 22, 2015 at 12:22 AM
I created new chart for case and reference the fields as customerid.address1_line1...etc. and when I try to save the chart/config I get the following error.


Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unexpected exception from plug-in (Execute): CrmChartMap.CrmChartMapPlugin.PreChartMapEntityCreate: System.InvalidOperationException: Sequence contains no matching elementDetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147220956</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Unexpected exception from plug-in (Execute): CrmChartMap.CrmChartMapPlugin.PreChartMapEntityCreate: System.InvalidOperationException: Sequence contains no matching element</Message>
<Timestamp>2015-01-22T00:19:42.0641244Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>

[CrmChartMap.CrmChartMapPlugin: CrmChartMap.CrmChartMapPlugin.PreChartMapEntityCreate]
[1efa89fc-e1b3-e311-991b-6c3be5a8517c: PreChartMapEntityCreate]

Entered CrmChartMap.CrmChartMapPlugin.PreChartMapEntityCreate.Execute(), Correlation Id: b3f7094f-83fa-4e65-8189-ca93626af536, Initiating User: 3f142dca-0cb6-4236-93dc-c9a02b6ad912
CrmChartMap.CrmChartMapPlugin.PreChartMapEntityCreate is firing for Entity: dd_chartmapentity, Message: Create, Correlation Id: b3f7094f-83fa-4e65-8189-ca93626af536, Initiating User: 3f142dca-0cb6-4236-93dc-c9a02b6ad912
Getting MetaData
Getting metadata for incident
Working on field: dd_namefield
Checking field dd_namefield ticketnumber
Local field
Updating Target
Working on field: dd_cityfield
Checking field dd_cityfield customerid.address1_city
LinkEntity Field
Lookup fieldname correct
Lookup field is valid
Getting metadata for account
Getting metadata for contact
Found entity: contact
Updating Target
Working on field: dd_addressfield
Checking field dd_addressfield customerid.address1_line1
LinkEntity Field
Lookup fieldname correct
Lookup field is valid
Getting metadata for account
Getting metadata for contact
Found entity: contact
Updating Target
Working on field: dd_postalcodefield
Checking field dd_postalcodefield customerid.address1_postalcode
LinkEntity Field
Lookup fieldname correct
Lookup field is valid
Getting metadata for account
Getting metadata for contact
Found entity: contact
Updating Target
Working on field: dd_stateprovincefield
Checking field dd_stateprovincefield customerid.address1_stateorprovince
LinkEntity Field
Lookup fieldname correct
Lookup field is valid
Getting metadata for account
Getting metadata for contact
Found entity: contact
Updating Target
Working on field: dd_countryfield
Checking field dd_countryfield customerid.address1_country
LinkEntity Field
Lookup fieldname correct
Lookup field is valid
Getting metadata for account
Getting metadata for contact
Found entity: contact
Updating Target
Working on field: dd_latitudefield
Checking field dd_latitudefield customerid.address1_latitude
LinkEntity Field
Lookup fieldname correct
Lookup field is valid
Getting metadata for account
Getting metadata for contact
Found entity: contact
Updating Target
Working on field: dd_longitudefield
Checking field dd_longitudefield customerid.address1_longitude
LinkEntity Field
Lookup fieldname correct
Lookup field is valid
Getting metadata for account
Getting metadata for contact
Found entity: contact
Updating Target
Completed Field Validation
Updating schema names
Adding dd_latitudeschemaname to Target
Exiting CrmChartMap.CrmChartMapPlugin.PreChartMapEntityCreate.Execute(), Correlation Id: b3f7094f-83fa-4e65-8189-ca93626af536, Initiating User: 3f142dca-0cb6-4236-93dc-c9a02b6ad912


</TraceText>
</OrganizationServiceFault>
Jan 22, 2015 at 12:23 AM
never...mind...just documentation about latitude field on linked entities and that resolved the issue.
Jan 22, 2015 at 7:36 AM
ok....was able to save case chart. but now I have a case view with the address fields from the account entity as specified in the chart config... (ie customerid.address1_line1...etc). the chart displays without error. but nothing is displayed in the map.
Coordinator
Jan 26, 2015 at 6:40 PM
Edited Jan 26, 2015 at 6:58 PM
srauda wrote:
ok....was able to save case chart. but now I have a case view with the address fields from the account entity as specified in the chart config... (ie customerid.address1_line1...etc). the chart displays without error. but nothing is displayed in the map.
The out-of-the-box Customer lookups can behave differently on some entities. I made it work with Opportunity by making a specific case for opportunities. I haven't been through all the standard entities that use that lookup (Case, Invoice, etc), it looks like some will work and some won't. Linking to parent record field will work better with custom lookup fields, because they are always the same.

So, long story short, using the Customer lookup to get parent values will be hit and miss. Some will work, some won't. I'll see what I can do about that for the next release.
Custom lookups should have no issues.

Edit: Just tested this on the case entity. Looks like it works if the parent customer is an Account, but fails if it is a Contact.
Jan 28, 2015 at 4:38 PM

Here is a screen shot of my case chart config.

Sincerely

Steve Rauda

Senior Applications Developer

CHR Solutions, Inc.

Voice: 713.351.5126

Mobile: 713.249.8578

Fax: 281.754.9170

Email: [email removed]

Website | Blog | LinkedIn | Twitter

P Please do not print this email unless it is absolutely necessary. Spread environmental awareness.