Objects

[SectionIntroduction]

[RCNotLoggedInNotAdmin][table id=11 /][/RCNotLoggedInNotAdmin]

[RCAdmin][table show_rows =all id=11 /]

[NextSection][/RCAdmin]

41 thoughts on “Objects”

  1. Hi John,

    Several questions on the use of standard objects:

    1. Standard objects are by default shared among various Apps – is this right?
    2. Is it a good practice in general to keep these standard objects shared among the various Apps (i.e. different App users can all access these standard objects)? I suppose not, since in real-world scenarios different Apps probably require different data to be save into these standard objects?
    3. Does it make more sense in general to associate the standard objects with just one App and create custom objects for each of the other Apps separately?
    4. Are standard objects clone-able through UI?

    Hope the questions make sense.

    Thank you.

    1. 1 – yes
      2 – in general you want to stick with the out of the box config and then modify as needed. most organizations dont really use the standard apps, as you can’t change the logo.
      3 – generally you create apps to match the selection of tabs/functionality that a group of users will need (e.g sales). It is not uncommon to have an app that exposes things differently for different groups (e.g. the sales app includes the campaigns tab – this tab is hidden for sales users but exposed for marketing users)
      4 – clone the configuration of the object: no. Clone records: yes

      hope that helps 🙂

  2. is it necessary to go throught details about external object and relationships from exam point of view. it’s bit difficult to visualise since it can’t be tried in developer org instance.

  3. Hi John,

    If i create a custom field on the account object to capture account credit status and want to display that field on opportunity object..
    which feature should i use?..workflow field update (or) cross-object formula field ? and why?

  4. Re Max Number of Roll-Up Summary fields per object:
    It says above that 10 is the max number of roll-up summary fields per object. I cannot find this reference in Salesforce documentation. Is this old information?

  5. Hi John,

    Thanks for putting together the guide. Its extremely helpful.

    I have a problem I am struggling with.

    I am trying to create a MASTER DETAIL relationship between two STANDARD Objects however I dont see that as option when I try creating a new field on a standard object?? I see that as option when I try and create a field on a custom object.

    can you possibly guide me as to why I am seeing this behaviour??

    It is a fact that salesforce does allow standard objects to be Master in a master detail relationship?? Funny why I cant see it as an option.

    Also is there a limit on the number of Master detail relationships a STANDARD object can have? I believe the limit is 2 for Custom objects.

    Will appreciate your advice on the above.
    Thanks

    Vaibhav

    1. Hi Vaibhav,

      A standard object can never be the detail object within a master-detail relationship; you cannot establish the relationship you are attempting to create. I believe you are correct that the max is 2 master-detail relationships on one object (which is typical of a junction object). Cheers,

      John

  6. Thanks Rovita for your response.
    However; I think parent records can be deleted in a master detail relationship which will automatically delete the corresponding child records.

    Hi John,

    Pease clarify on the below questions.

    1. While creating a lookup relationship you have an option – Don’t allow deletion of the lookup record that’s part of a lookup relationship. If this option is enabled then it does not allow me to delete the parent record (I hope I did the test correctly).
    It looks almost similar to the behaviour of a master detail relationship when you enable this option from the lookup except you cannot delete the parent record if the parent has any child record. If this scenario is true then there would be some other reason/logic for not allowing to create a rollup summary if objects are related using lookup relationship.

    2. Does Standard object always associate with the many/detail side in a lookup relationship or is there any exception?

    Thanks.

    1. 1. The limitation was a decision made by Salesforce – I suspect for performance reasons, but ultimately I don’t know :/ No rollups without a master-detail relationship for custom objects, however. There are AppExchange packages that can work around that.
      2. True for master/detail – a standard object is going to be the master of any custom m/d relationship created. Same is not true for lookups. E.g. A campaign that references a venue object via lookup relationship would be an example where the venue is the many side of the relationship.

  7. Roll-up Summary fields calculate values from a set of related records. In a Master Detail relationship, the child cannot exist without a parent which means you cannot delete the parent, whereas in a Lookup relationship, child can exist without a parent. If the rollup summary field is referenced in, say a report, and you delete that record (which a possible in a lookup relationship), you don’t want inaccurate information. I think that is the reason why Rollup summary fields can be created only in a Master Detail relationship.

    1. That’s a good thought Rovita – but the relationship between account and opportunity is a lookup (and yet you can use a rollup summary field). Ultimately it was probably a design/engineering decision made by Salesforce.

  8. Thanks John for the answer. My question is : I would like to know the logic or reason why rollup summary cannot be created if custom objects are related using lookup relationship.

      1. Let me take a shot at this.

        Roll-up Summary sums up values from the Detail object and renders it on the Master Object. This is feasible because, in a Master-Detail relationship objects are bound to each other (i.e. a child has to have a parent). In a Lookup relationship, on the other hand, the child does not have to have a parent. So, summing up values of a child object and rendering it on a parent object does not make sense in a Lookup relationship because, here, a parent and child do not have a binding relationship and are not committed to each other.

  9. Hi John,

    Why roll up summary field is getting disabled while selecting a look up relationship for a particular field? Is there any specific logic behind that?

    Thanks.

    1. Not sure exactly what the question is – a rollup summary can only be created with master/detail relationships or select lookup relationships (e.g. account/opportunity). There may be limits on the fields that you can filter on (e.g. you may not be able to filter data based on a cross-object formula)…

  10. Is there a list of which features require activation? I also am fuzzy on what the correct terms are for ‘something the admin needs to turn on’ (“enabling??”) vs ‘something salesforce support needs to turn on’ (“feature activation”??).

  11. Administrator made one field as required field but there are few user still able to create record without completing the required field. How Administrator can sort this issue.

    a. Make sure field level security is not set to “read only” in user profile.
    b. Make sure field set as required on all page layouts assigned in profile.
    c. make sure the user have “edit permission” on field in assigned profile.
    d. Make sure user have “Modify All” permission in profile.

    Please if some explain from his/her experience.

    Regards

    1. Probably make sure field is required on page layout. However, that would not stop the user from creating records via the API without the field populated.

      None of the other answers would either though – what would really work is to modify the field itself and make the field required – this would be enforced via the API as well.

    2. Though it’s an old question, let me elaborate what John has already said about making the field required in a page layout.
      The answer should be choice b.
      I think the choice is not worded correctly. It should be – Make sure field ‘is’ set as required on all page layouts assigned in profile..

      There are 3 ways to make a field required
      (reference: https://help.salesforce.com/apex/HTViewSolution?id=000003107&language=en_US )-
      1. Field level Requirements:
      This is the most restrictive of requirements and it requires the field to be entered all the time, regardless of how the record is saved (i.e. through an integration, the API, mass upload, or through the User Interface)
      2. Page Layout
      This option only makes the field required when the specific page layout that you make this field required is accessed. Therefore, you could technically make this required for some users using a particular page layout but not others.
      3. Validation Rule Requirement
      By creating a rule to check if the field isBlank or isNull (in case of number or currency field)

  12. Question – if in a master detail relationship, the detail object can not be a standard object, how come Account-Opportunity is a master detail relation as both are std objects?

    1. The relationship between opp and account is non-typical. If you were to recreate the relationship using custom objects, it would have to be a master-detail relationship. SFDC probably did this to facilitate rollup summaries specifically on the account/opportunity relationship (as it is quite a popular one) despite the lookup relationship between the two.

      1. Is search not dependent on the profile access on record? means if profile has read or edit access; then can we search the record in object irrespective of the fact that tab is hidden?

        Please clarify.

  13. Hi John,

    I am confused about the the limits with respect to Recycle Bin. Can you please confirm with respect to latest update/information?

    Number of days the following will remain in the recycle bin until they are permanently deleted?
    Deleted records – 15 days or 30?
    Deleted objects – 15 days or 30?
    Deleted custom fields – 15 days or 45?

    Thanks,
    Sree

Leave a Reply