locked
How to map custom entity lookup fields on CRM to NAV using CRM-NAV Connector?

    Question

  • Hi Guys,

    I have created custom entity in MS CRM2011. (For E.g. Product Category as a custom entity).

    And then i created 1-N Relation from Product Category(custom entity) to Product. And created a lookup on CRM product form.

    We are trying to push MS-NAV R2 Item Card to MS-CRM 2011 Product using a tool from MS called MS-Dynamics CRM-NAV connector.

    we do mapping fields between NAV item card to CRM Product master. In this mapping, we mapped Item Category Code field from NAV Item card to Product Category(custom entity lookup) on CRM product master.

    While we push NAV Item card to CRM Product using MS-Dynamics CRM-NAV Connector. It can't push the record and showing some error log message which i have listed below. Kindly review it and help me out in fixing this issue.

    Error Log :

     'new_category' entity doesn't contain attribute with Name = 'name'.
      Platform

     

    Even i created name field in product category(custom entity).

    Thanks in advance.

    With regards,

    S.Ramprakash

    Wednesday, March 9, 2011 9:52 AM

Answers

  • I started using these tools awhile ago and that is the sort of thing you see a lot.  We had a problem where the system would error out and not accept custom CRM fields and MSFT basically didn't believe it until they also reproduced it on their side and then the answer was that it will be fixed in the next release.

    Again, my personal opinion is to buy scribe.  For the man hours you will put into those free integration tools figuring them out you could pay for it.


    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Sunday, April 17, 2011 11:46 PM
    Moderator

All replies

  • I think it is pretty similiar to the CRM to GP connector in that if you modify your entites/attributes you need to reconfigure your org within the connector tool to be able to begin mapping them.

    Personal opinion: I don't like working with these connector tools at all, I prefer Scribe.


    Jamie Miley
    Wednesday, March 9, 2011 2:52 PM
    Moderator
  • hai did you find a solution to your problem ....even we are facing same problem ....MS support says this is a known issue and will be fixed in next update .......any other solution
    Friday, April 15, 2011 10:42 PM
  • I started using these tools awhile ago and that is the sort of thing you see a lot.  We had a problem where the system would error out and not accept custom CRM fields and MSFT basically didn't believe it until they also reproduced it on their side and then the answer was that it will be fixed in the next release.

    Again, my personal opinion is to buy scribe.  For the man hours you will put into those free integration tools figuring them out you could pay for it.


    Jamie Miley
    http://mileyja.blogspot.com
    Linked-In Profile
    Follow Me on Twitter!
    Sunday, April 17, 2011 11:46 PM
    Moderator
  • Create a plugin and registered steps for “Retrieve” and “RetrieveMultiple” on pre-stage . Idea is to intercept the query from connector to CRM and change filer condition, so that it can pick up the required record. 

      

    public sealed class CustomEntityCheckNameAttribute : IPlugin

        {

     

            public void Execute(IPluginExecutionContext context)

            {

                if (context.MessageName != "Retrieve" && context.MessageName != "RetrieveMultiple")

                    return;          

                if (context.PrimaryEntityName.Contains("<prefixforCustomEntities>")) //Replace with your prefix

                 {

                    if (context.InputParameters.Properties.Contains("Query"))

                    {

                        QueryExpression query = (QueryExpression)context.InputParameters.Properties["Query"];

                        FilterExpression fexp = query.Criteria;

                        foreach (ConditionExpression condition in fexp.Conditions)

                        {

                            if (condition.AttributeName == "name")

                                condition.AttributeName = "dynamics_integrationkey";

     

                        }

                    }

                }

            }

        }

    Monday, April 18, 2011 1:52 PM
  • Facing the same problem here.

    Can't belief this does not work properly!

    The other way around doesn't work either.. If you try to update a NAV record with 'look up' field thats linked to the Integration key of a custom entity it will just go blank.

     

    Haven't tried your Plugin solution yet, bhogavilli, but doesn't that mean you can never use Retrieve or RetrieveMultiple with the name condition?

    As in it does not only do this for the connector?

     

    Thanks,

    Richard.

    Thursday, August 25, 2011 2:05 PM
  • This plugin from bhogavilli resolve issue with names for sure.

    And, if I'm not mistake, it's fixed in PACK 6


    Monday, September 19, 2011 10:18 PM
  • Hi, I installed and configured connecter pack 6 but the problem remains same. can any one have solution on this. I am using this connecter from last 3 months and so fade up of this... Any one have solution for look up fields???
    Tuesday, October 4, 2011 12:15 PM
  • HI,

    i am doing integration between CRM 2011 and NAV 2009 R2, but i am facing challenges while integrating look up fields.

    For example i am integrating NAV Customers to CRM Accounts. i tried it for three four times and face different errors for look up fields.

    1 Tried: Integration successful and completed but in Account form Owner field is "Integrated". i can’t maintain owner for that Account.

    2 Tried error: All integration Successful and completed but in Account form look up fields are blank.

    I am so fade up with this Connecter. is anyone have solution for to integrate look up fields .  I used conncter Pack 6 also but error remain same

     

    Tuesday, October 4, 2011 1:14 PM
  • Hi,

    I'm using connector version 2 released in december 2011 and I encountered this problem still.

    I managed to solve problem with code provided by  bhogavilli

    I Hope MS will fix this sooner than later


    Systems Architect, MCITP, Finland



    Wednesday, February 22, 2012 8:45 AM
  • I am having this problem when trying to lookup the Contract entity.

    I notice the contract entity has renamed the name field to be called title.

    do I need to add the plugin code to the contract entity?


    Ben Hosking
    Check out my CRM Blog
    Linked-In Profile
    Follow Me on Twitter!

    Wednesday, February 22, 2012 5:04 PM
  • Hi Ben,

    This script should solve your issue

    Cheers,

    Konstantin


    www.nav-connector.com

    Thursday, February 23, 2012 2:09 AM
  • Hi,

    If I can recall correctly, MSFT marked this issue as "solved". I never tryed yet disable this pluging for FP6 and FP7.

    Cheers,

    Konstantin 


    www.nav-connector.com

    Thursday, February 23, 2012 2:16 AM
  • This issue isn't solved because I was getting this problem and I was using the latest release of the connector and  CRM 2011 rollup 6 and I couldn't lookup contracts because they didn't have a field called Name.

    I used the code provided above, slightly changing it 

            public void Execute(IServiceProvider serviceProvider)
            {
                // Obtain the execution context from the service provider.
                Microsoft.Xrm.Sdk.IPluginExecutionContext context = (Microsoft.Xrm.Sdk.IPluginExecutionContext)
                    serviceProvider.GetService(typeof(Microsoft.Xrm.Sdk.IPluginExecutionContext));
    
               if (context.PrimaryEntityName.Contains("<prefixforCustomEntities>")) //Replace with your prefix
                {
    
    
                    tracingService.Trace("in the if statement");
                    if (context.InputParameters.Contains(("Query")))
                    {
    
                        QueryExpression query = (QueryExpression)context.InputParameters["Query"]; ;
                        FilterExpression fexp = query.Criteria;
                        foreach (ConditionExpression condition in fexp.Conditions)
                        {
                            if (condition.AttributeName == "name")
                                condition.AttributeName = "dynamics_integrationkey";
    
    
                        }
    
    
                    }
                }
            }



    Ben Hosking
    Check out my CRM Blog
    Linked-In Profile
    Follow Me on Twitter!

    Thursday, February 23, 2012 1:14 PM
  • Contract Entity is different case, it's out of box entity.

    They tryed to resolve issue with custom entities only I think.

    Becase you cannot have Name in your entity, CRM always add prefix - new_name

    Cheers,

    Konstantin


    www.nav-connector.com

    Thursday, February 23, 2012 1:24 PM
  • Interesting. I am looking up this issue because I am using Scribe.  Just wanted to be sure people don't "pay for it" thinking they will get past the issue.  I am sure I'll figure it out and Scribe definitely saves time but it is still weeks of work!  Even with their migration Maps.

    Error in calling Operation Create: Operation failed. Label: Create contract, Name: contractCreate, Message: -2147217149:'Contract' entity doesn't contain attribute with Name = 'billto_postalcode'.

    Sunday, July 23, 2017 5:04 PM