Skip to contentIntroducing the Integration Factory
Back to Blog
Integration

What Are Salesforce Objects and Fields? A Guide for SaaS Teams

Sunny Chauhan

Salesforce objects are the tables that hold a customer's records, and fields are the columns on those tables. Salesforce's own reference puts it the same way, "Salesforce objects and fields are analogous to database tables and the table columns" (Overview of Salesforce Objects and Fields). For a SaaS product, the useful version is narrower. Every customer org shares the standard objects, but each one adds its own custom objects, its own custom fields under API names your code has never seen, and its own field-level security on the user you connect as. Whatever you build against Salesforce is really built against that variation.

That is why the data model is a product decision for founders and CTOs, not an admin detail. If you build a customer-facing integration, your code has to read objects and fields it has never seen before. If you ship a managed package, the objects and fields you define become part of every customer's org, and some choices can't be changed after the first release. Appnigma's integration infrastructure is built for the first case. Its page says you can "Add custom objects, field transformations, and workflow rules for individual customers." For the second, Appnigma's marketplace apps team builds "A Salesforce managed package or HubSpot app built around your product and customer workflows." Admins who want click-by-click setup steps are better served by Trailhead's Data Modeling module.

Updated October 2026. Checked against Salesforce's Object Reference, the 2GP packaging guide, the AppExchange install FAQ, and the edition allocation pages in Salesforce Help. The earlier version gave the wrong Enterprise Edition custom object allocation (it is 200, not 500), said packaged objects always count against the customer's allocation, and claimed packaged master-detail fields can be overridden by subscribers. This version corrects those and adds how field types look in the API and which data model choices lock at release.

How to tell standard, custom, external and big objects apart

Your code can tell every object type apart by API name alone, because each type has a fixed suffix. That matters more than the definitions, since a schema read from a customer org is just a list of names. The Salesforce Object Types page says "You can identify an object type by its developer API name," and lists the suffixes.

SuffixWhat it isExample
noneStandard objectAccount, Opportunity
__cCustom object or custom fieldInvoice__c, Renewal_Date__c
ns__ ... __cCustom object or field from a managed packageacme__Invoice__c
__rCustom relationship name used in SOQLInvoice__r.Name
__xExternal objectOrder__x
__bBig objectEvent_Log__b
__mdtCustom metadata typeConfig__mdt
__ePlatform eventSync_Request__e
__Share, __History, __ChangeEventSharing, field history and change event objects for a custom objectInvoice__Share

The namespaced row is the one integrations miss. When a package is managed, "A namespace prefix is added to each component to make it unique, name__c becomes prefix__name__c" (AppExchange Object Prefixes and the API). A customer who installed another vendor's app may have both Invoice__c (their own) and othervendor__Invoice__c (the app's). Matching on labels instead of API names is how a sync ends up writing to the wrong one.

Which field types your product will meet, and what the API calls them

Salesforce Help lists 27 custom field types on its Custom Field Types page, from Auto Number to URL. Your code never sees those labels. It sees API data types, and several UI types collapse into one. The Field and Type Differences in Salesforce Apps and APIs page gives the mapping.

What the admin picked in SetupWhat describe and queries return
Lookup or master-detail relationshipID (a reference to another record)
Text, text area, long text area, rich text area, email, phone, URL, picklist, multi-select picklist, auto numberstring
Checkboxboolean
Currency, number, percent, roll-up summary, numeric formuladouble
FormulaThe return type chosen when the formula was created

Three details cause most mapping bugs. Multi-select picklist values arrive as one string, and the Field Types reference says "Selections are maintained as a string containing a series of attributes delimited by semicolons." Record IDs come in two lengths, and the same page notes the 15-character form is case-sensitive while API calls "return an 18-character ID that's case-safe." Store the 18-character form, because two records whose 15-character IDs differ only by case look identical to a case-insensitive database. Text lengths also differ by type. Text fields go up to 255 characters, while long and rich text area fields go up to 131,072 characters (Custom Field Types), so a column sized for one will truncate the other.

Fields can also be invisible rather than missing. The Object Reference states that "fields that are not visible to a given user are not returned in a query() or describeSObjects() call" (Factors that Affect Data Access). When one customer's sync is missing a field the others have, check field-level security on your integration user before you look for a schema difference. Our guide to mapping each customer's custom fields to your product covers the describe calls and stored mappings that handle this at scale.

What is the difference between lookup and master-detail?

The difference is who controls deletion and access. Salesforce describes a lookup as one that "links two objects, but has no effect on deletion or security," while with master-detail "When a record of the master object is deleted, its related detail records are also deleted" (Relationships Among Standard Objects and Fields).

LookupMaster-detail
Child can exist without parentYesNo
Parent deletedField is cleared by default (CustomField)Detail records are deleted
SharingChild has its own owner and sharing"The detail record inherits the sharing and security settings of its master record"
Roll-up summary fields on parentNoYes
Per objectCounts toward 40 total relationshipsUp to 2 per object

The limits come from Salesforce Help, "Each custom object can have up to two master-detail relationships and up to 40 total relationships" (Object Relationships Overview). Several popular tutorials say "40 lookups," but the 40 covers every relationship field on the object. Hierarchical relationships exist only on User, and many-to-many uses a junction object with two master-detail fields, which spends both of that object's master-detail slots.

For a vendor, the choice has a consequence the admin tutorials skip. A master-detail on your object makes your records disappear when the customer deletes the parent. If your product stores a copy of those records, your sync needs to treat a cascade delete as expected behavior, not data loss. Master-detail also has direction rules. A standard object "can't be on the detail side of a relationship with a custom object," so a package that wants roll-ups onto Account has to put its own object on the detail side.

How many custom objects and fields can a Salesforce org have?

It depends on the customer's edition, and the numbers people quote are often wrong. The edition allocation pages in Salesforce Help give these figures.

EditionCustom objectsCustom fields per object
Professional50100
Enterprise200500
Unlimited and Performance2,000800
Developer400500

Sources for the table are the Enterprise, Unlimited, Professional and Developer Edition allocation pages and Custom Fields Allowed Per Object. Above those allocations sit hard ceilings that apply to every org. The Enterprise page says no org can have more than 3,000 custom objects "regardless of the source or namespace of those objects." Most objects top out at 900 custom fields, and that list includes Account, Contact and every custom object.

Once your package is listed, the ceilings bind, not the allocations. Before that, the allocations decide whether you can install at all. As arithmetic from the table, an Enterprise customer already at 190 of 200 custom objects can take a privately installed package of 10 objects and no more. Count your package's objects and its fields per target object, then put both numbers in your install guide.

Field slots also run out faster than the count suggests. Help's Considerations for Object Relationships says "Each relationship is included in the maximum number of custom fields allowed." A geolocation field also counts as three custom fields and an address field as nine, per the Enterprise allocation page. A few other per-object limits shape schema design.

LimitValueSource
Fields with history tracking20, or up to 200 with Field Audit TrailField Audit Trail
External ID fields (Unique fields included)25Custom Field Attributes
Formula length3,900 characters, plus a compiled size limit in bytesFormula Evaluation in Apex, formula limits
Big objects per org100Big Objects Best Practices

Do managed package objects count against the customer's limits?

Only partly, and it depends on whether the package is publicly listed. For a listed package, the install FAQ says its objects and fields "don't count against your edition's allocation, but they do count against the total limit of your Salesforce org" (AppExchange Install Guide FAQ). The same page says an unmanaged package, or a managed package that isn't publicly listed, counts against the allocation in full.

Here is what that means in one org, as arithmetic from the documented limits. Take an Enterprise Edition customer with 480 custom fields already on Account, and a package that adds 60 fields to Account. If the package is listed, the 60 fields skip the 500-field allocation and only the 900-field ceiling applies, so 540 fits. If you install the same package privately before your listing goes live, the 60 fields count against the allocation, 540 exceeds 500, and the install fails. The FAQ names this as a failure cause, "The package includes custom objects that will cause your organization to exceed its limit of custom objects." The edge case to watch is early pilots on private installs with large, heavily customized customers.

One more condition applies after launch. Help notes that if a certified managed package "expires, the custom fields in that package count against the edition custom field limit" (Custom Fields Allowed Per Object).

Which data model choices lock when your package is released

Once a managed package version is released, some field attributes can't be changed by you or the customer. The 2GP packaging guide lists them under "Neither Package Developer or Subscriber Can Edit" (Components Available in 2GP Managed Packages). For custom fields, it covers Data Type, Field Name and Child Relationship Name. It also covers External ID, Unique and the roll-up summary settings. That applies to lookup and master-detail fields like any other field, so a relationship type you ship is the one you keep.

In practice, four decisions need to be right before the first release.

  • The field type. A Text field can't later become a Picklist, and a lookup can't later become a master-detail inside the released package.
  • The upsert key. Whether a field is an External ID or Unique is locked, so pick the key your sync will match on before release.
  • Required fields. The same guide says "Auto-number type fields and required fields can't be added after the object is included in a Managed - Released package."
  • API names. Field and object names are locked, and every customer's reports, flows and integrations will reference them.

Removing a field later is possible but slow. "Removing components from managed 1GP or 2GP packages requires approval from Salesforce," and removed custom fields and objects stay in customer orgs marked as deprecated (Remove Metadata Components from 2GP Managed Packages). The customer's admin then deletes them. Customers can still add their own fields to your objects, and those fields have no namespace. For a wider view of what customers can and can't change after install, see what a managed package is.

Mistakes that break integrations and packages across customer orgs

  • Hardcoding custom field names. One customer stores contract value in ARR__c, another in Contract_Value__c. Read the schema per org with describe and store a mapping per customer.
  • Matching on labels. Admins can relabel fields and tabs, but API names stay fixed. Map on API names and show labels only in your UI.
  • Assuming a sharing setup ships with your package. The packageable component lists include permission sets and Apex sharing reasons but no owner-based or criteria-based sharing rules (Components Available in 2GP Managed Packages). Plan for the customer's admin to configure sharing.
  • Ignoring soft-deleted objects. Help notes that "Soft-deleted custom objects and their data count against your limits," so a customer near 200 custom objects may have less room than Setup suggests.
  • Storing 15-character IDs. Use the 18-character form everywhere your product keys on Salesforce records.

Frequently Asked Questions

What are Salesforce objects and fields?

Tables and columns. For your product, the point is that standard objects match across orgs while custom (__c) and packaged (ns__Field__c) objects and fields differ in every org, so read them through describe instead of hardcoding them.

How many custom objects can Salesforce Enterprise Edition have?

200 custom objects and 500 custom fields per object, against 2,000 and 800 on Unlimited. A listed package's objects skip that allocation, but every org stops at 3,000 custom objects and 900 fields on most objects.

Do managed package custom objects count against org limits?

If the package is publicly listed, they count only against the hard ceilings. Private installs before your listing goes live count in full, which is where installs into heavily customized orgs fail.

Can you change a field type after a managed package is released?

No. Data Type, Field Name, External ID and Unique are locked for you and the customer, so a wrong type means adding a new field and asking Salesforce to approve removing the old one.

Can Appnigma build our objects, fields and integrations?

Yes. Appnigma's done-for-you team will "Support each customer's objects, field mappings, and workflows." Its marketplace apps team builds the managed package itself, with Salesforce security review preparation and responses.

Sources

  1. Overview of Salesforce Objects and Fields, Object Reference
  2. Salesforce Object Types, Object Reference
  3. AppExchange Object Prefixes and the API, Object Reference
  4. Field and Type Differences in Salesforce Apps and APIs, Object Reference
  5. Field Types, Object Reference
  6. Factors that Affect Data Access, Object Reference
  7. Relationships Among Standard Objects and Fields, Object Reference
  8. CustomField, Metadata API Developer Guide
  9. AppExchange Install Guide FAQ
  10. Components Available in 2GP Managed Packages
  11. Remove Metadata Components from 2GP Managed Packages
  12. Field Audit Trail, Security Implementation Guide
  13. Big Objects Best Practices
  14. Formula Evaluation in Apex, Apex Developer Guide
  15. Salesforce Enterprise Edition Allocations, Salesforce Help
  16. Salesforce Unlimited Edition Allocations, Salesforce Help
  17. Salesforce Professional Edition Allocations, Salesforce Help
  18. Salesforce Developer Edition Allocations, Salesforce Help
  19. Custom Fields Allowed Per Object, Salesforce Help
  20. Custom Field Types, Salesforce Help
  21. Custom Field Attributes, Salesforce Help
  22. Object Relationships Overview, Salesforce Help
  23. Formula Field Limits and Restrictions, Salesforce Help

Which integration is your next deal waiting on?

Bring the customer requirements and your current setup. Get a clear scope and delivery timeline to take back to them.

© 2026 Appnigma AI. Built by ex-Salesforce engineers.