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....
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
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.
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
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.
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
52
Victor Onyebuchi
6