Skip to main content

Notifications

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 82
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
  • Verified answer
    MarkusG365 Profile Picture
    82 on at
    Opportunity, by contact, account?
    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.
     
     
  • Suggested answer
    Krishna Acharya Profile Picture
    79 on at
    Opportunity, by contact, account?
    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!
     
  • Suggested answer
    Tom_Gioielli Profile Picture
    918 on at
    Opportunity, by contact, account?
    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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,304 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans