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 6917793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:46:32+00:00 2026-05-27T09:46:32+00:00

So I have a CRM integration that adds two fields to the lead and

  • 0

So I have a CRM integration that adds two fields to the lead and contact. An integer and a Boolean. When we convert a lead into a contact I want those custom fields from the lead to carry over to the new contact. We have over 700 instances using our product so this needs to be a programmatic solution. And thats where the problem lies. I haven’t been able to wrap my head around the CreateAttributeMappings class and was hoping someone here could enlighten me and show me where I’m being dumb…

Right now I’ve got something like this:

var parentEntityMapId = new v4.Sdk.Lookup();
parentEntityMapId.name = "lead";
parentEntityMapId.Value = Guid.NewGuid();

var entityMapId = new v4.Sdk.Lookup();
entityMapId.name = "contact";
//entityMapId.Value = new Guid("608861bc-50a4-4c5f-a02c-21fe1943e2cf");
entityMapId.Value = Guid.NewGuid();

var attributeMapId = new v4.Sdk.Key();
attributeMapId.Value = Guid.NewGuid();

var attributeMap = new v4.SdkTypeProxy.attributemap();
attributeMap.attributemapid = attributeMapId;
attributeMap.entitymapid = entityMapId;
attributeMap.sourceattributename = fieldNameFrom;
attributeMap.targetattributename = fieldNameTo;
//parentEntityMapId.Value = new Guid("DC6574CB-92CE-446C-A5D6-885A75107D52");
attributeMap.parentattributemapid = parentEntityMapId;

var targetAttributeMap = new v4.SdkTypeProxy.TargetCreateAttributeMap();

targetAttributeMap.AttributeMap = attributeMap;

var attributeMapCreateRequest = new v4.SdkTypeProxy.CreateRequest();
attributeMapCreateRequest.Target = targetAttributeMap;

var response = this.CrmService.Execute(attributeMapCreateRequest);

However this gives me this error message:

0x80046203
Invalid mapping. Either an attribute is not mappable, or attributes are of different types, or the size of the target attribute is smaller than the size of the source attribute.
Platform

Any help or insight you could give me would be greatly appreciated.

  • 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-27T09:46:32+00:00Added an answer on May 27, 2026 at 9:46 am

    Finally figured it out. Need to pull the existing entity map and then just add the two fields and send the request. Something so simple was so frustrating…

        public void CreateAttributeMapping(string fieldNameFrom, string entityNameFrom, string fieldNameTo, string entityNameTo)
        {
            var entityMap = Retrieve("entitymap", new List<FilterCriteria> { new FilterCriteria("targetentityname", entityNameTo), new FilterCriteria("sourceentityname", entityNameFrom) }, null);
    
            var entityMapId = new v4.Sdk.Lookup();
            entityMapId.name = entityMap.GetKeyName();
            entityMapId.Value = entityMap.GetKeyValue();
    
            var attributeMap = new v4.SdkTypeProxy.attributemap();
            attributeMap.entitymapid = entityMapId;
            attributeMap.sourceattributename = fieldNameTo;
            attributeMap.targetattributename = fieldNameFrom;
    
            var targetAttributeMap = new v4.SdkTypeProxy.TargetCreateAttributeMap();
    
            targetAttributeMap.AttributeMap = attributeMap;
    
            var attributeMapCreateRequest = new v4.SdkTypeProxy.CreateRequest();
            attributeMapCreateRequest.Target = targetAttributeMap;
    
            var response = this.CrmService.Execute(attributeMapCreateRequest);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a webservice into my companies self developed CRM system that we
We have written an add-on for Outlook that files emails into our CRM system.
We have Exchange integration into our CRM (diaries and email); we have done this
I have created an omnibar extension that searches our company crm. I want to
Greetings! Situation: We have a CRM system that generates unique customer IDs. Now we
Javascript I have code that will hide various sections in a MS CRM form
Suppose that you have a big Data Entry Web Application Like Microsoft CRM ,
I have some concerns about the Integration of Magento with other CRM,ERP systems. How
I have a CRM application (GoldMine) that acts as a DDE Server and allows
I have installed the MS Dynamics CRM on my windows server 2003. I want

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.