Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How to create a link between two entities

Posted on by Microsoft Employee

We have two entities - Opportunites and Contracts, that we would like to have linked in a way that when a opportunity is closed as "won", a contract is created from the originating opportunity, and the new contract is populated with information from the closed opportunity. We have this link working in a similar way between the Leads and Opportunities entities (when a lead is qualified, a opportunity is created from the lead and select info from the lead populates the opportunity), but cant seem to get it to work the same way between Opportunities and Contracts.

It should flow as follows:

Lead ->Opportunity ->Contract ->Project

Thanks in advance, Chris

*This post is locked for comments

  • Suggested answer
    PS Profile Picture
    PS 23,577 on at
    RE: How to create a link between two entities

    You would require a plugin for this second issue

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to create a link between two entities

    Thank you for the response. My only other question is that in the event that a user reopens the opportunity and then closes it as won again (which may happen from time to time), it would create a second contract. Is there a way to prevent this? I only want a contract to be created the first time the opportunity is won...

  • Suggested answer
    PS Profile Picture
    PS 23,577 on at
    RE: How to create a link between two entities

    Create a relationship: Go to settings>>Customization>>Customize the system>>Entity>>Opportunity>>1:N>>New>> Create Opportunity to Contract relationship here

    Map fields one by one

    Create a workflow or Plugin: Entity = opportunity

    Trigger on status change

    Check condition= when opportunity status= won

    Action= create contract (map fields here as well)

    Update your Business process Flow (if any): On the Contract 1st stage, select relationship = 'name of the relationship' between opportunity and contract

    https://technet.microsoft.com/en-us/library/dn531171.aspx 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to create a link between two entities

    Is there a way to build the workflow into a Process Flow? The reason we wanted to create this link is so that we could make a single Process Flow that takes the user through the entire process, from Lead through to Project. Currently, with the gap between Opportunities and Contracts, we have not been able to make this Process Flow.

  • Suggested answer
    kyleknab Profile Picture
    kyleknab 517 on at
    RE: How to create a link between two entities

    The relationship you describe between the Lead and Opportunity entities is OOTB.  To do something similar in your transition from a won Opportunity to a Contract, I recommend using a workflow that fires when the opportunity is won, and use data from that won opportunity to create the Contract record.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans