Owner mapping and status of Entitiy issues in lead

Jun 14, 2015 at 3:55 PM
Hi Team,

We are migrating CRM2015 On-prem to online using this MSCRM Toolkit. Users are mapped properly from On-Prem to Online (Using "Records Mapping"), but still we are facing following issues in Online CRM 2015
  1. Lead Owner still shows only Migrator/Admin User Name(Who is migrating from On-prem to Online).
  2. Status of lead(entity) showing only Open Status "New" (but leads are Qualified in CRM On-Prem)
please suggest me out to resolve these issues.

Thanks
Ashokraj R
Aug 31, 2015 at 8:51 PM
I found out that for migrating the ownership it is sufficient to comment the "ownerid" value from the IgnoredAttributes list in the MSCRMTransportationProfilesManager class.


I was trying to do the same for the status, by uncommenting the statuscode in the same list and by changing the if conditions that appears in the inner for loop of the same function to
// Only write out main attributes enabled for reading and creation, or the statecode
if ((((currentAttribute.AttributeOf == null) &&
    currentAttribute.IsValidForRead.Value &&
    currentAttribute.IsValidForCreate.Value  &&
    IgnoredAttributes.IndexOf(currentAttribute.LogicalName) < 0) || currentAttribute.LogicalName.Equals("statecode")))
I tried to run the code on a sample inactive account. The data gets pulled by the source is correct: statecode is 1 and statuscode is 2.
Still, the execution fails with the message "2 is not a valid status code for state code AccountState.Active on account with Id x-y-z."

Where is the code changing the statecode after it has been read from the source?