Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Lead migration - leadsourcecode is outside the valid range

Posted on by Microsoft Employee

I am not an expert in Dynamic CRM and I started a job a week ago. The project I am involved in is migration. I'm trying out KingsWaySoft and I'm running some migration tests. At this moment I can not migrate the lead entity.
I always have the message: CRM service call returned an error: A validation error occurred.  The value of 'leadsourcecode' on record of type 'lead' is outside the valid range.

I have no idea what to do to solve the problem....

lead_5F00_source.PNG  

lead_5F00_destination1.PNG

I used Text Lookup in the fields : 

input column: owneridname
destination CRM files: ownerid Choisir: Chose Target Fields(s)
how text lookup is performed: Chose Target Fields(s)
Lookup methode: Manually Specify
systemuser: Target: fullname
team: Target: name
Options: Ignore Case
Cache: Full Cache
=======================
input column: transactioncurrencyname
destination CRM files: transactioncurrencyid
how text lookup is performed: Chose Target Fields(s)
Lookup methode: Manually Specify
Target: currencyname
Options: Ignore Case
Cache: Full Cache

=======================
input column: createdbyname
destination CRM files: createby
how text lookup is performed: Chose Target Fields(s)
Lookup methode: Manually Specify
Target: fullname
Options: Ignore Case
Cache: Full Cache

*This post is locked for comments

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Lead migration - leadsourcecode is outside the valid range

    Hi Marcelo ,

    You need to check 'leadsourcecode' value in Dynamics CRM . Please check below reference where "Aileen Gusni" mentioned where you can get the value.

    community.dynamics.com/.../141457

    You just need to check the option set value and pass.

    Hope this helps.

  • Verified answer
    KingswaySoft Profile Picture
    KingswaySoft 545 on at
    RE: Lead migration - leadsourcecode is outside the valid range

    To expand on what Thomas stated, for this issue, you can try to enable Redirect rows to error output in the Error Handling page of the CRM Destination component, and then direct the Error Output (red arrow) to a destination component to log the failed records. This would help you identify the failed records and tell you what value of leadsourcecode is causing the trouble.

    Once you get the invalid leadsourcecode value, you can go to your target CRM instance and check the option values in the leadsourcecode column of lead entity. You can find this column via Settings | Customization | Customize the System | Components | Entities | Lead | Fields, double-click the leadsourcecode column to list all the Option values this OptionSet column has.

    Then, you can either create the options there manually (via UI) or use our CRM OptionSet Mapping component to manager the translation and mapping of CRM OptionSet fields (via SSIS).

    Please let us know if you have any further trouble.

    Thank you,

    KingswaySoft

    By the way, in case you were unaware, we have a CRM-CRM Migration Starter Pack: https://www.kingswaysoft.com/blog/2016/09/16/Announcing-Migration-Starter-Pack-for-CRM-Online-and-CRM-On-Premise

  • Verified answer
    Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Lead migration - leadsourcecode is outside the valid range

    I think for this problem is that there is a record which you are trying to create which hasnt got a correct leadsourcecode value.

    Usually the lead source code value is either 1,2,3,4,5 etc.. Check the option set field in Leads

    There might be a Lead record in your table which has a lead source code value of 1000000 which is doesnt exist in the option set. What you will need to do is update the incorrect records with a valid value. Then try and import it again.

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