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 365 | Integration, Dataverse...
Suggested Answer

Linking a new Lead to an existing Opportunity without creating a duplicate Opportunity

(0) ShareShare
ReportReport
Posted on by
Community, I know the out of the box Lead to Opportunity process, during Lead Qualification, will automatically create an Opportunity.  We have imported a large number of Opportunities, without Lead data. We are attempting to input new Lead information and link the Lead to an existing Opportunity without creating a duplicate Opportunity during the Lead Qualification process.
 
So far we tried following the steps below generated by Copilot without success...
 
 
Step-by-Step: Link Lead to Existing Opportunity via Power Automate
 
1. Trigger the Flow
 
Use the "When a row is added or modified" trigger from the Dataverse connector:
- Table name: Leads
- Scope: Organization
- Filter: Trigger only when the custom Existing Opportunity lookup field is populated.
 
2. Get the Lead Record
 
Use "Get a row by ID" to retrieve the full Lead record:
- Table name: Leads
- Row ID: From the trigger
 
3. Get the Existing Opportunity
 
Use "Get a row by ID" again:
- Table name: Opportunities
- Row ID: From the custom lookup field on the Lead
 
4.  Update the Opportunity (Optional)
 
You can update the Opportunity to reflect the new Lead association. For example:
- Add a note or timeline entry
- Create a custom subgrid to show related leads
 
5. (Optional) Create a Connection Record
 
If you want to formally link the Lead and Opportunity, create a Connection:
- Table: Connections
- Set Record 1 as the Lead
- Set Record 2 as the Opportunity
- Define a Connection Role (e.g., "Lead Source")
----------------------------------------------------------------------------
This approach avoids creating a duplicate opportunity and gives you full control over how leads are tied to existing sales efforts.
 
 
When I ran the qualification process on the Lead, a duplication Opportunity was created even when I selected an existing Opportunity in the Existing Opportunity field added to the Lead Form.
 
Please advise...
Categories:
I have the same question (0)
  • Suggested answer
    afeter Profile Picture
    13 on at
    Hi,
     
    To cover your need, there are 3 options (obviously ignoring manual actions):
    1.  Modify the Business Process Flow 
    You can customize the qualification process to allow selecting an existing Opportunity:
    • Add a custom step to check if an existing Opportunity should be used.
    • Create a new Lookup field on the Lead form for Existing Opportunity.
    • Adjust the logic via JavaScript or Power Automate with the follow logic:
      • If the user selects an Existing Opportunity, link the Lead to it instead of creating a new one.
     
    I would consider this option only if it is the most common scenario.
     
    1.  Use a Plugin
    You can create a custom plugin that intercepts the QualifyLead message and:
    • Avoid the automatic creation of the opportunity.
    • Relate the Lead to an existing Opportunity based on some business rules.
     
    This is a more complex option but if you work with code it is a good option.
     
    1.  Use a Power Automate Flow
    You can automate this process using Power Automate:
    • Trigger: When a Lead is qualified
    • Condition: Check if a related Opportunity already exists.
    • Action: Update the existing Opportunity instead of creating a new one.
     
    If you are not used to working with code, this would be the best option.
     
    I hope it helps.
    Alberto
  • Suggested answer
    Tom_Gioielli Profile Picture
    3,086 Super User 2026 Season 1 on at
    Be wary of Copilot generated answers. While they can sometimes help, other times they hallucinate or grab information from a bad source and it can be hard to tell where the good information begins and where it ends.
     
    On to your requirement... The Opportunity table and the Lead table both contain lookup fields to each other.
     
    On the Opportunity table, the field is called [Originating Lead]
    On the Lead table, the field is called [Qualifying Opportunity]
     
    When importing your leads, all you need to do is map a unique field from the Opportunity into this Qualifying Lead table and make sure that the mapping is properly set. Easiest would be for you to input the GUID of the Opportunity into this column, but any unique field will do (if for example you have a custom ID field or something else used to reference Opportunities).
     
    You should not need to worry about Power Automate, plugins, workflows, or anything else. Just import and update that field and you should be good to go. I will note that best practice would have you also update the field on the Opportunity to point back to the lead, that way your relationships mimic what would be done by the Out of Box process.
     
    Finally, you can close the lead through the import process as Qualified without clicking the button within CRM, which might attempt to create a new record even though one already exists. Best of luck, and let me know if you run into any issues!
  • Suggested answer
    Inogic Profile Picture
    764 on at
    You’re trying to prevent the creation of a duplicate Opportunity when a Lead is qualified — specifically when an existing Opportunity is already linked to the Lead.

    We reviewed your Power Automate solution, which attempts to associate the Lead with an existing Opportunity. However, it's important to note that the standard Lead qualification process in Dynamics 365 will always create a new Opportunity — even if a Lead is already linked to an existing one.

    To address this, here are two alternative approaches:

    Approach 1: Set Lead Status Without Qualification

    If the Lead already has an existing Opportunity linked:
    • Programmatically update the Lead status to “Qualified” (StateCode = 1).
    • This avoids using the default "Qualify" action, which triggers Opportunity creation.
    • The Lead remains closed as Qualified, and no new Opportunity is created.
    Users can still manually reactivate the Lead if needed.

    Approach 2: Pre-Operation Plugin on Lead Qualification

    • Create a pre-operation plugin on the Lead entity.
    • During qualification, check if the custom “Existing Opportunity” field is populated.
    • If it is, cancel the qualification operation.(e.g., display a warning).
    • This prevents the automatic creation of a duplicate Opportunity.

    Both approaches give you more control over the qualification process and allow you to reuse existing Opportunities without duplication.

    Hope this helps.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 84

#2
Subra Profile Picture

Subra 76

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 70 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans