What we do
Tools
Industries
Department
How we workLet's talk →
Home/Salesforce/Salesforce Objects
Salesforce

Salesforce Objects: Standard vs Custom, How They Relate, and How Data Gets In

Everything in Salesforce is a record in an object. An object works like a database table, its fields are the columns, and each record is a row. Salesforce ships with standard objects like Account, Contact and Opportunity. You add custom objects for what's specific to your business.

Short answer

Standard objects come built in, with default fields and behavior: Account, Contact, Lead, Opportunity, Case and dozens more.

Custom objects are ones you create, like Equipment or Warranty Claim. Their API names end in __c, as do custom fields on any object.

Setup Object Manager Create Custom Object

Relationships link them: a lookup or master-detail field on one object points to a record on another, like an Opportunity pointing to its Account.

New custom object, or a field on one you already have?

Most messy orgs got that way by creating objects that should have been fields, or squeezing lists into fields that should have been objects.

What you want to track Usually Why
One fact per record, like a contract end date on an Account A custom field on the standard object There's one value per account, so a new object only adds a join to every report.
Many of something per record, like the machines installed at each customer site A custom object with a relationship to Account Fields like Machine 1, Machine 2 and Machine 3 break the day a customer has a fourth.
The same object, handled differently by team, like service deals vs product deals Record types on the standard object Different page layouts and picklist values without splitting your pipeline reports in two.
Something that belongs to two parents at once, like a Contact who works with several Accounts A junction object with two master-detail fields It's how Salesforce models many-to-many. Check the standard options first: Contacts to multiple Accounts is built in once switched on.

Lookup or master-detail?

Lookup

A loose link

  • The child record can exist without the parent, and the field can be left blank.
  • Deleting the parent doesn't delete the child.
  • The child keeps its own owner and sharing.
Master-detail

A child that belongs to its parent

  • Every detail record must have a master.
  • Deleting the master deletes its details with it.
  • Details inherit the master's sharing, and the master can carry roll-up summary fields like a total or a count.

Pick master-detail when the child means nothing without its parent and you want roll-up totals. Pick lookup for anything else. Converting later is possible but fussy, so decide before you load data.

Loading data into Salesforce objects without making a mess

  1. 1

    Clean the file before Salesforce sees it

    Remove duplicates, fix spellings of picklist values, and split full names into first and last. Every problem in the file becomes a problem in hundreds of records.

    Watch for: picklists that aren't restricted. Salesforce accepts the odd spelling, and your reports quietly split one value into three.

  2. 2

    Add an external ID field

    Give each object a custom field marked as an external ID, holding the record's ID from the old system. Later loads can then upsert, updating what's there and creating what isn't, instead of guessing by name.

  3. 3

    Load parents before children

    Accounts first, then Contacts and Opportunities that point at them, then anything that hangs off those. Each child row refers to its parent by external ID, so the links survive.

  4. 4

    Pick the tool for the size

    The Data Import Wizard in Setup handles up to 50,000 records at a time for common standard objects and custom objects. Data Loader handles much bigger loads, objects the wizard doesn't support, and loads that run on a schedule. Above that, the Salesforce API lets an integration do it continuously.

  5. 5

    Test on a small batch, then check reports

    Load fifty rows, open a few records, and run a report that should match a total from the old system. Fix the mapping before the full run, not after.

Where Salesforce data gets lost or doubled

A bulk delete outruns the recycle bin

How you'll know: Records went missing more than two weeks ago.

Fix: Deleted records stay in the Recycle Bin for 15 days, or until the org's allowance for deleted records fills, whichever is sooner. After that they're gone from the standard tools. Take an export or snapshot before any mass delete.

Deleting a master takes its details with it

How you'll know: You removed some old Accounts, and their custom child records vanished too.

Fix: That's how master-detail works. Before deleting parents, check which objects hang off them by master-detail, and export those first.

Every import creates a fresh set of duplicates

How you'll know: The same company appears three times, each with a few of the contacts.

Fix: Upsert on an external ID instead of inserting, and set up duplicate and matching rules so people creating records by hand get warned too.

Getting data back out

For a full export, Setup's Data Export produces your org's data as CSV files. Enterprise, Performance and Unlimited editions can schedule it weekly; Professional and Developer editions monthly. A report can export straight to CSV or Excel for something smaller, within a row limit. For exact objects and fields, or very large pulls, Data Loader or the API does the job.

Once records have left the Recycle Bin, Salesforce's own data recovery service is slow, costs money and isn't guaranteed. A scheduled export of the objects you care about is the cheaper insurance.

n-frames builds that insurance and the plumbing around it: scheduled backups of key objects to a warehouse or spreadsheet, a snapshot taken automatically before bulk jobs run, and imports mapped onto your objects with external IDs. We also connect Salesforce to the systems around it, such as Jira, NetSuite and Mailchimp.

Questions people ask

What's the difference between a standard object and a custom object in Salesforce?

Standard objects, like Account, Contact and Opportunity, come built in with their own fields and behavior, and some features only work with them. Custom objects are ones you create in Object Manager for things Salesforce doesn't model, with whatever custom fields you need. Their API names end in __c.

What field types does Salesforce support?

Text, number, currency, date, checkbox and picklist (a fixed list of choices) are the everyday ones. Lookup and master-detail fields link to other objects. Formula fields calculate a value from other fields, and roll-up summary fields total child records on a master-detail parent. The type decides what the field can do, so pick it before loading data.

How do I export data from Salesforce?

Use Data Export in Setup for everything, which Enterprise, Performance and Unlimited editions can schedule weekly, and Professional and Developer editions monthly. Export a report to CSV or Excel for a smaller set. Use Data Loader or the API for precise or very large exports.

How long do deleted records stay in the Salesforce recycle bin?

15 days, or until your org's storage for deleted records is full, whichever comes first. After that they're no longer in the recycle bin.

Can I recover records after they disappear from the Salesforce recycle bin?

Not from the standard screens. Salesforce has a paid data recovery service, but it's slow and limited. A backup or export from before the delete is the dependable route, and it's why a snapshot should come before any bulk delete.

What is a junction object in Salesforce?

A custom object with two master-detail fields, one to each of two other objects. Each junction record links one record on each side, so one project can have many consultants and one consultant many projects.

Let's talk

Tell us the one thing your team does manually that eats up time. We read every message and reply within a day.