web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

SSIS: Lead Already Closed

(0) ShareShare
ReportReport
Posted on by

I am using SSIS to move leads from one Dynamics CRM to another Dynamics CRM. I am having some issues with transferring leads, though. I always get the error "The lead is already closed". How can I move the lead over without reopening it (which means I would create duplicates when closing it again).

*This post is locked for comments

I have the same question (0)
  • Mamatha Swamy Profile Picture
    5,426 on at

    The import wizard allows importing Qualified Leads into CRM so you should be able to do the same using SSIS. At what stage are you getting this error?

  • Aileen Gusni Profile Picture
    44,524 on at

    Halmu,

    You are using Kingswaysoft also?

  • halmu Profile Picture
    on at

    Mamatha, it fails when trying to write it to the destination CRM (CRM Online).

    Aileen, yes I am using Kingswaysoft.

  • Community Member Profile Picture
    on at

    Hi halmu,

    You can try using an SSIS Derived Column to open the lead by changing the statecode and statuscode of the record. Once you migrate the lead records, you can update the statecode and statuscode to close the leads.

  • Aileen Gusni Profile Picture
    44,524 on at

    Halmu,

    I will try to ask Kingswaysoft for this.

    THanks.

  • Community Member Profile Picture
    on at

    Hi Aileen, please see the response above. As mentioned, you can use the SSIS Derived Columns to open the lead by adding new columns (with the combination of the statecode and statuscode set to open) in between the source and KingswaySoft CRM Destination Component. Once the records have been created, you can add a second Destination Component to update these records to the closed state (ex. by mapping the actual statecode and statuscode).

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Nicole,

    That's good suggestion.

    Halmu, you can try, but mentioned before, Halmu doesn't want to open the Lead and then close it again.

    I was looking for a special message or sspecial field mapping or action hat maybe Kingswaysoft can help us to migrate a closed record, not only for qualified lead but also other entities.

    Thanks.

  • Verified answer
    Daniel Cai Profile Picture
    935 on at

    Hi Aileen/halmu,

    If the record is already in the target system, you would have to re-open the record. There is no other way around.

    For a brand new migration that you start from scratch, we generally recommend a 3-step approach. The first step would be the create step with no statecode/statuscode fields mapped, and the second step to migrate all child records, and last step to update statecode/statuscode fields.

    I suspect halmu has previously done one round of migration, and is running another round of Upsert. If that's the case, you would have to re-open the records. Another option is to delete all records from the target system and re-run the Upsert migration. Note that if your source data has not changed, you can try to turn on "Ignore Unchanged Fields" option in CRM destination component, which could help you get away from this error (this only works if the record has not been re-opened and modified at the source system side).

    Thanks,

  • halmu Profile Picture
    on at

    All, thanks a lot for the responses. It turns out that it was a problem with our data. For the source I used FetchXML and did a join between opportunities and leads. In a few cases there were (wrongfully) two opportunities for one lead which means the program tried to write the same lead twice (but it was already closed the first time around). Daniel's input actually pointed kind of in the right direction (the lead already existed). Now I just have to solve my issue with emails but I put that into another thread.

  • Daniel Cai Profile Picture
    935 on at

    Sounds good, thanks for letting us know Halmu.

    Have a great day!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Liquid error: parsing "/globalsearch/?q=inceptua++luxembourg+declaration" - Nested quantifier +.