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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Opportunity, by contact, account?

(2) ShareShare
ReportReport
Posted on by 84
Hi Community, 
 
we are preparing opportunities only through accounts, not through contacts. Would it be possible to identify the way - created through contact somehow? This causes some problems with a third party app, which we need to fill with account data.
 
Thank you for your thoughts and help in advance.
 
Best regards
 
Markus
I have the same question (0)
  • Suggested answer
    Tom_Gioielli Profile Picture
    2,795 Super User 2025 Season 2 on at
    There are a few ways you can do this, depending on how you want the system to behave. There are probably even more options than this, I'm sure someone with some Copilot generated responses will be along. Just a note, a lot of those responses like to recommend plugins or non-configuration code to achieve functionality. In this case, I would say that is overkill.
     
    1) You can do a check via Dynamics workflow when the Opportunity is created, or the [Customer] field is modified. If you put in a check condition to the workflow to the effect of "If Customer (Contact) Created On contains data". If you set this to a real-time workflow, you can even stop the workflow with an error and show the message to the user letting them know they can't create an Opportunity against a contact.
     
    2) Alternatively, instead of throwing an error you could use the workflow to automatically update the [Customer] on the Opportunity to whatever the parent Account of the chosen contact record is. In this way, you aren't preventing users from picking a contact and you still get to see the Account information.
     
    3) Option 2 above can also be done through a Power Automate flow. After creation or update of the [Customer] field on the Opportunity, you can run the flow and have it check the table type of the Customer lookup field. If it returns 'contact', then you will want to update it to an Account record. The downside of the Power Automate approach is that you cannot run it in real-time, so the user doesn't learn at all that they should not be using contact records.
     
    4) The last option, if absolutely necessary, is to hide the Out of Box [Customer] field and put your own lookup field to the Account table on the form for the user to populate. You can then force an Account to be chosen and use a real-time workflow to move the value from this field into the out of box [Customer] field.
     
    This is a relatively common request from a lot of my customers, so you certainly have options. Personally, I like #1 as it can be used to reinforce training for the users and make sure they are picking correct values themselves.
     
    If this answer helped, please consider marking as verified.
  • Suggested answer
    Krishna Acharya Profile Picture
    123 on at
    Hello  
     
    We create Opportunities only through Accounts, not Contacts. However, we need a way to identify if an Opportunity was mistakenly created through a Contact, as this is causing issues with a third-party app that requires Account data.
    You can do below possible way for find opportunity create from contact :
    1. Custom Field & Business Rule:
      • Add a "Created via Contact" (Yes/No) field on the Opportunity.
      • Use a business rule to set this field when a Contact is linked instead of an Account.
    2. Workflow or Power Automate Flow:
      • Automatically check if the Opportunity is linked to a Contact and flag it.
      • If a Contact is used, trigger a notification or update a field for tracking.
    3. JavaScript on Form:
      • Prevent users from selecting a Contact in the lookup field.
      • Display a warning if a Contact is used instead of an Account.
    4. Advanced Find & Reports:
      • Run an Advanced Find Query to check if any Opportunities are linked to Contacts.
      • Schedule a report to monitor and clean up incorrect records.
     
    If my response is helpful, please mark it as Verified.

    Thank you!
     
  • Verified answer
    MarkusG365 Profile Picture
    84 on at
    Thank you for your throughts and ideas, which I really appreciate!
     
    I found another solution. When creating the opportunity through an contact with "quick create" it automatically filled the account; therefore it was not possible to use a workflow, which checked the filled data in account.
     
    Considering this idea I created a field for "created through contact", which is a hidden field for the user. It is filled automatically, when new contacts are created. Using the field mapping from contact to opportunity, it will transfer the data now to the opportunity, whenever the opportunity has been created through the contact. 
     
    A workflow in the opportunity checks now, if the field within the opportunity is filled => information to user. If not, the field is not shown in the form with a business rule.
     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 73 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans