Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Encountering "Invalid Argument" Error when Mapping a field of a "Customer" Type

Posted on by 25

I have Entity "A" and Entity "B" with a 1:N relationship from A to B and on both Entities I have a Customer Lookup Field. (The new type at CRM 2016)

I create a new field Mapping between these fields without any problem.But when I want to Add a new record of Entity B from Entity A the mapping is not working and it gives me "Invalid Argument" Error with the following details:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D5A7B05DDetail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D5A7B05D</Message>
<Timestamp>2017-04-10T10:03:56.4730911Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220989</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>entityName</Message>
<Timestamp>2017-04-10T10:03:56.4730911Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d4p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.ArgumentNullException: Value cannot be null.
Parameter name: entityName</Message>
<Timestamp>2017-04-10T10:03:56.4730911Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>

*This post is locked for comments

  • Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Encountering "Invalid Argument" Error when Mapping a field of a "Customer" Type

    Hi Sina,

    You could enable tracing to know more details of this error.

    Refer the following community thread.

    community.dynamics.com/.../155605

    Hope this helps.

  • Sina Khodaparast Profile Picture
    Sina Khodaparast 25 on at
    RE: Encountering "Invalid Argument" Error when Mapping a field of a "Customer" Type

    Hi Tom,

    Yes,That is my case. I think that's a bug,too.

    I am trying to map the customer field from Entity A to customer field on Entity B.

  • ThomasN Profile Picture
    ThomasN 3,190 on at
    RE: Encountering "Invalid Argument" Error when Mapping a field of a "Customer" Type

    Hi Sina, sorry I misunderstood.

    This may be a bug, as I have come across this before. I cannot map fields that are part of a "customer" type field. For instance if I have an account field on an opportunity, I cannot create mappings for that account field, because account is used in parentaccountid as part of the OOB customer field.

    I would guess same is happening here for you. Are you trying to adjust Mapping on the 1:N between A and B, or on the customer field on each?

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Encountering "Invalid Argument" Error when Mapping a field of a "Customer" Type

    Hi Sina,

     honestly, if it's version-specific then, unless somebody here ran into it on exactly the same version.. it might be a good reason to contact MS support. But yes, it did work for me in the online trial environment.

  • Sina Khodaparast Profile Picture
    Sina Khodaparast 25 on at
    RE: Encountering "Invalid Argument" Error when Mapping a field of a "Customer" Type

    Dear Alex

    I have the problem at Microsoft Dynamics CRM 2016 Service Pack 1 (on-premises). It would be a good news if this error had been solved in the newer versions.

    And this error can happen for any entity that has been customized by adding the Customer field.

  • Sina Khodaparast Profile Picture
    Sina Khodaparast 25 on at
    RE: Encountering "Invalid Argument" Error when Mapping a field of a "Customer" Type

    Hi Tom

    Thanks for the reply. I have a customer field on entity A, which in fact is two lookup fields to Account and Contact Entities. And I have the same customer field on Entity B. You can read more about the customer field which is a new Capability added since CRM 2016 update 1 at the following post:

    https://community.dynamics.com/crm/b/crmandunifiedservicedesk/archive/2016/06/13/crm-2016-update-1-customer-field

    so here, there is no need to the third entity.

    My problem is at mapping customer field from customer of Entity A to customer of Entity B.

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Encountering "Invalid Argument" Error when Mapping a field of a "Customer" Type

    This seems to be working just fine in the online trial (which is 8.2).

    That error, though, can probably happen for various reasons.. I'm wondering if, in your example, it's happening for any two entities if you map customer fields between them, or if it's only happening for those particular entities A and B. 

  • ThomasN Profile Picture
    ThomasN 3,190 on at
    RE: Encountering "Invalid Argument" Error when Mapping a field of a "Customer" Type

    Hi Sina, thanks for reaching out.

    I could be wrong but the Customer type field requires three entities, what is the third entity? The purpose is that entity C has a 1:N to both A and B, which are interchangeable, but always one or the other, and now with customer field type you can have only one field represent the two entities. Otherwise it is just a lookup from B to A which creates the 1:N relationship on A and allows you to add Entity B to Entity A.  

    The system is trying to populate entity C but that is missing (null). Let me know how to help.

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