Microsoft Dynamics CRM 2013 Opportunity record association to parent record (Account or Contact) is based on “Potential Customer” field.
In the past, by default, Microsoft Dynamics CRM opportunity record only had “Potential Customer” field to map the opportunity record to the parent record whether that was an account or a contact. The “Potential Customer” field was a unique lookup field that allowed the user to select either an account or a contact record.
In the enhanced Microsoft Dynamics CRM 2013 UI, the “Potential Customer” field has been removed by default from the “Opportunity” form (still available in the entity) and instead Microsoft explicitly introduced “Account” and “Contact” lookup field in the Opportunity form. This is a very useful enhancement in the latest Microsoft Dynamics CRM 2013 (in the past, this was only available via additional customization). This approach now enables opportunity record to track both account and contact information/relationship; however, there is one limitation which I will elaborate here.
Here’s how it works. When you populate account or contact field in the opportunity record, the Microsoft Dynamics CRM 2013 automatically populates the “Potential Customer” field in the background. Although the “Potential Customer” field has been removed from the form, this field is very much necessary field (required field in the background). Below is a mapping of what happens.
When an opportunity record is created, the “Potential Customer” field is auto populated by the Microsoft Dynamics CRM 2013 in the background. For example, when account and contact fields are both populated, then “Potential Customer” is populated with account name; however, when only contact field is populated then the “Potential Customer” is populated with the contact name. While this seems obvious, there’s one exception. If you try to update an opportunity record and remove account field and instead associate the opportunity to a contact, then you will receive an error message (see #1 below). (Note: Not sure if this is as designed or if it needs to be fixed by Microsoft.) All other combination of populating Account and Contact fields works in the opportunity record.
Note that Potential Customer field always get populated with either account or contact data. Furthermore, the system will always select account to populate Potential Customer field if both account and contact fields are populated. (UPDATE: 8/1/14: If opportunity is created from contact record, then Potential Customer field is populated with contact name even if both account and contact fields are populated upon opportunity record creation. I don’t like how this behaves but that’s how it is at this time. The table below does not reflect this exception scenario.)
|#||Account||Contact||Potential Customer||Account||Contact||Potential Customer|
|1||New Record||A||A||–>||Update Record||B||Error occurs. Record Not updated|
|2.1||New Record||B||B||–>||Update Record||A||A|
|3.1||New Record||A||B||A||–>||Update Record||B||B|
If you need the users to be able to perform this option, then you will need to create custom jscript or PBL to update the “Potential Customer” field behind the scene. If you use PBL, you will need to insert the Potential Customer field on the form. Also note that once you insert the Potential Customer field on the form, you will not be able to remove it but you will be able to hide it.
Here’s two simple PBLs (currently PBL does not support OR function) you will need to create to handle the scenario 1. (note: there are 3rd party add-on tools that does OR and more complex functions.) First PBL will always set the Potential Customer to account name, if account field is populated. The second PBL will set Potential Customer to Contact name if account field is blank.
Having a good understanding of how Microsoft Dynamics CRM 2013 works behind the scene and applying those knowledge to end users will help improve the usage of the Microsoft Dynamics CRM 2013 application and overall user adoption. Hope this helps!