Custom Objects, Applications, & Tabs

Describe a Custom Object

A custom object is one that is not initially packaged with the application.  If it isn’t a standard object, it must be a custom object.  An example of a custom object could be a Payroll object created for a custom payroll application.  Accounts, Contacts, Opportunities, and so on are all standard objects.


Describe the types of relationships that can exist between objects

One to Many

There are 3 types of relationships that can be created in Salesforce.com – master-detail, lookup, and hierarchical.  Each of these relationships is a one to many relationship.

Many to Many

Many to many relationships are established by creating a linking object.  The linking object must have a relationship to each of the objects it is linking together.  For instance,

In a custom application, two custom objects “Job Posting” and “Applicant” require a many to many relationship.  To do this, create an object “Job Posting Applicant Link” (the name is not important), and create lookup (or master-detail) relationships on this object to both "Job Posting” and “Applicant”.  If master-detail relationships are used, when either a “Job Posting” or an “Applicant” is deleted, all related "Job Posting Applicant Link” records are deleted.

The related lists on Applicant and Job Posting can be configured to displayed the corresponding information from each object through the linking object.


The only way to create a seamless (no visible linking object to the end user) many to many relationship is to use custom code.  Please vote to include this functionality: Pure many-to-many relationships.

See “Creating a Many-to-Many Relationship” for more details.

Relationship types


  • The owner of master record automatically owns all associated detail records.
  • Security controls for the master record control the detail record.
  • A detail record must be linked to a master record in order to save the record (e.g. you must link an opportunity to account to save the opportunity).
  • Only one level deep – a detail object cannot also be a master object.  Please vote to remove this limitation: Multiple Master-Detail relationships.
  • A detail record can have two different master records (two master-detail relationships must be created).
    • This feature was released in Summer 08 to give greater flexibility when creating many to many relationships as described above.  Prior to then, only one master-detail record could be present per object, meaning that record deletions for object “Job Posting to Applicant Link” could only be triggered by a “Job Posting” deletion or an “Applicant” deletion; not either.

Lookup Relationship

  • One to Many relationship links one record to another record.
  • Can link standard to custom objects and vice versa, or link to the same object type (parent account, for instance).


  • A lookup relationship on the user object to the user object (for instance the standard field “Manager”).
  • Record cannot point to itself (I cannot be my own manager).

See “Overview of Relationships” for more details.


Create a Custom Object

Create –> Objects


  • Label
  • Plural Label
  • Object Name
    • Used for API calls
  • Description
  • Context-Sensitive Help Setting
  • Record Name
    • Appears on related lists, e.g. “Account Name” instead of “Account”
  • Data Type
    • Either text or auto-number.
  • Allow Reports
  • Allow Activities
  • Track Field History
    • Enables the option to track fields- you still need to add the fields to be tracked and add the related list to the page layout.
  • In Development / Deployed
    • If listed In Development, only users with the “Customize Application” permission will be able to see it.


Describe a Custom Object Tab and a Web Tab

Custom Object Tab

A custom object tab provides a tab to access a custom object.  Creating a custom object tab will do the following:

  • Enable search results for the custom object.
  • Enable the object as an option in the “Create New…” menu in the sidebar.
  • Set the icon that represents the object.
  • Set the color scheme for the page layout of the icon.


If a custom object does not have an associated tab, it is only possible to access the object (from the UI) through reporting (if enabled) or through related lists where applicable.  Assets is a standard object example of this situation.

Group+ Edition


Web Tab

Web tabs can be used link in external content from websites other than Salesforce via an S-Control or URL.  Here is an example of a web tab set to http://www.google.com:image

Group+ Edition


Create a Custom Object Tab

Create –> Tabs

  • Only one tab per object is possible.
  • Enabling a splash page for the object will let you configure an introductory page (similar to introductory pages in setup; for instance, email to case setup), and will give the user the following option:


Create a Web Tab

Create –> Tabs

There are a few more options for web tabs:

  • Choose width
    • Full page width – removes left sidebar
    • 2 columns with Salesforce sidebar
  • S-Control or URL
  • Content Frame Height
    • You can set the maximum height for the frame (this will create a scroll bar within the frame if the page is longer than the height)
  • Splash Page Selection


Describe a Custom App

An application determines which tabs are listed by default.  A custom application is no different- you can choose from standard/custom objects and what tabs are displayed by default.  A user can customize this list per application specific to their account.

ns have no impact on object, field-level, or tab security (if a tab is hidden on the user profile, it will never be visible).


Select my custom Projects application:


And get the custom image (Projects Home w/triangle) with just the Projects tab visible:



Create a Custom App

Create –> Apps

  • Custom Image
    • The image must be a document marked as an Externally Available Image to be selectable
  • Default Landing Page (Home or object)
  • Select tabs
  • Assign visibility to profiles

11 Responses so far.

  1. dsNo Gravatar says:

    Hi John,
    you have excellent study guide here, just a minor correction to the ER diagram between job posting – junction object – application. the many (triangle) should be in the junction object (job posting to applicant link). thx.


  2. John CoppedgeNo Gravatar says:

    Thanks ds,

    I must have been on a reversal kick while writing this guide- there are a few that are off. Hope it doesn’t detract much from the content. Cheers,


  3. SONo Gravatar says:

    Yes, the diagram for the many-to-many relationship should be other way around. Other than that, it’s excellent – thanks!

  4. keerthanaNo Gravatar says:

    I have a small clarification.

    what is the relationship between account and opportunities?

    Is it master -detail or look up?

  5. John CoppedgeNo Gravatar says:

    Hi keerthana,

    Good question. The field listed on the opportunity setup page lists it as a lookup relationship to account, however master-detail functionality exists between the two objects (e.g. roll-up summaries, etc.).

    I’m not sure which it was classified as technically.

  6. NinoNo Gravatar says:

    Thanks for this. For the benefit of others who use your blog as a reference for their review, can you add the new relationship Master-Detail-Subdetail which was the new feature of Spring ’10? Thanks

  7. Anu karthiNo Gravatar says:

    Hi every one i need to do salesforce certification of developer certification type . I want some study materiels or dumps for salesforce certification to be a certified developer.

    So please help me by providing some dump for doing certification on salesforce..

  8. PiyushNo Gravatar says:

    I am planning to give Salesforce Developer certification. I have gone through study materials. Can anyone plz provide certification dumps so that I can be confident before going for exam as certification charges are quite high so I want to clear it in first attempt.


  9. hanasahiNo Gravatar says:

    Hi John,

    I have a small clarification for master-detail relationship

    For the recruiting application on Fundamentals,
    Candidate connect to Job Application by master-detail,
    Job Application connect to Review by master-detail
    So it looks like we can create multi-level master-detail relationship.
    It makes me confuse, because it conflicts with your guide mentioned about.
    Please help me understand that what relationship between Candidate/ Job Application/ Review and it is possible to create multi level master-detail? Thanks in advance.

  10. John CoppedgeNo Gravatar says:

    Yes multi-level master-detail relationships are possible 🙂 You can have two master-detail relationships on a single object (e.g.a junction object) or multiple levels (e.g. product <- subproduct <- category product).

  11. Atul GuptaNo Gravatar says:

    Excellent information you have here John. Great work.

    But I think this guide is not being updated for quite some time now.
    Please update it pulling in the new features are now available with much recent releases.

    Even I got confused somewhat 😛

    Thanks, Keep up the Good Work 😀

Leave a Reply