3

On Opportunity there is a lookup relationship to Account.But why it behaves as Master-Detail as we can create Rollup Summary Fields on Account.

Similarly if we delete Account then Contact gets deleted but there is lookup relationship between Contact and Account

What is the relationship between Opportunity/Account and Contact/Account ? (Lookup or Master-Detail)

1 Answer 1

8

They are a unique category of fields commonly referred to as standard lookup fields. Unlike custom lookup fields, they have the generally have the "cascade deletion" property set to true, and unlike custom master-detail fields, they may have the "always required" property set to false. Also, these fields can restrict deletion of accounts when certain conditions are met. To learn their special properties, refer to Help for any particular field.

EDIT:

It's now possible to enable custom lookup cascade deletion, which has a similar behavior to how Accounts/Contacts, Account/Cases, and Account/Opportunities behave, but without the ability to restrict deletion when certain criteria are met. You can read this Knowledge Article for more information.

7
  • @sfdcfox..When I click on help against AccountName field on Contact I am getting below link which doesn't give any info.help.salesforce.com/…
    – sfdc
    Jun 15, 2014 at 20:30
  • Why there is an option for rollup summary for opportunities but not for contacts from Account
    – sfdc
    Jun 15, 2014 at 20:34
  • 1
    @sf.dev It's not that simple, I'm afraid. You usually need to refer to Release Notes (e.g. Spring '13 Release Notes), the Developer Documentation, and Help (e.g. Opportunity Fields), and the Idea Exchange. Many features exist because users asked for it, some because it makes good business sense, and others for no known reason at all.
    – sfdcfox
    Jun 15, 2014 at 20:52
  • 1
    @sf.dev On the other hand, in your specific example, the "why" for being able to roll up opportunity fields but not contact fields is a matter of business purpose. Many organizations find it useful to be able to roll up opportunity stats to an account (e.g. total sales, pipeline, etc), while only a few organizations would find it useful to roll up contacts. That's not to say that you can't write your own code to perform a roll up yourself, but simply that there hasn't been sufficient interest or priority to implement the feature.
    – sfdcfox
    Jun 15, 2014 at 20:54
  • 1
    @sf.dev The problem with "standard" fields versus "custom" fields is that standard objects have specially coded functions to optimize their use, while custom objects use a generic engine. That's why you can't (yet) create an Address field; these are special fields with special properties that are specially coded into the platform. The community (us) will be here to help you along, and you'll surely find some neat trick tucked away somewhere that'll be useful.
    – sfdcfox
    Jun 15, 2014 at 20:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .