
Salesforce App Limits Cheatsheet
DOWNLOAD
First things first !
To download this implementation guide, click the download button below.
If you need more information about the implementation guide, you can read the Table of Contents below.
SALESFORCE DEVELOPER LIMITS AND
ALLOCATIONS QUICK REFERENCE
Summary
Find the most critical limits
for developing Lightning
Platform applications
About This Quick Reference
This quick reference provides common limits and allocations for Salesforce and does not cover all limits
and allocations It might contain limits or allocations that dont apply to your Salesforce org Stated limits
arent a promise that the specified resource is available at its limit in all circumstances Load performance
and other system issues can prevent some limits from being reached
This guide doesnt include limits or allocations for
User interface elements in the Salesforce application
Field lengths of Salesforce objects
Desktop integration clients
Your Salesforce contract
Information for specific feature limits such as the number of total and active rules in your org are also in
Salesforce Help see the topics for using that feature For allocations per edition see Salesforce Features
and Edition Allocations Contractual limits might also apply as per your Salesforce contract
Apex Governor Limits
Read up on Apex limits details in Execution Governors and Limits
Because Apex runs in a multitenant environment the Apex runtime engine strictly enforces limits to
ensure that runaway Apex code or processes dont monopolize shared resources
PerTransaction Apex Limits
These limits count for each Apex transaction For Batch Apex these limits are reset for each execution of
a batch of records in the execute method
This table lists limits for synchronous Apex and asynchronous Apex Batch Apex and future methods
when theyre different Otherwise this table lists only one limit that applies to both synchronous and
asynchronous Apex
Description
Total number of SOQL queries issued
Synchronous Asynchronous
Limit
Limit
Total number of records retrieved by SOQL queries
Total number of records retrieved by
DatabasegetQueryLocator
Total number of SOSL queries issued
Last updated February
Salesforce Developer Limits and Allocations Quick Reference
Apex Governor Limits
Description
Synchronous Asynchronous
Limit
Limit
Total number of records retrieved by a single SOSL query
Total number of DML statements issued
Total number of records processed as a result of DML statements
Approvalprocess or databaseemptyRecycleBin
Total stack depth for any Apex invocation that recursively fires triggers
due to insert update or delete statements
Total number of callouts HTTP requests or Web services calls in a
transaction
Maximum cumulative timeout for all callouts HTTP requests or Web
services calls in a transaction
seconds
Maximum number of methods with the future annotation allowed
per Apex invocation
Maximum number of Apex jobs added to the queue with
SystemenqueueJob
Total number of sendEmail methods allowed
Total heap size
Maximum CPU time on the Salesforce servers
Maximum execution time for each Apex transaction
MB
MB
milliseconds
milliseconds
minutes
Maximum number of push notification method calls allowed per Apex
transaction
Maximum number of push notifications that can be sent in each push
notification method call
PerTransaction Certified Managed Package Limits
Certified managed packagesmanaged packages that have passed the security review for
AppExchangeget their own set of limits for most pertransaction limits Certified managed packages
are developed by Salesforce ISV Partners are installed in your org from Lightning Platform AppExchange
and have unique namespaces
Theres no limit on the number of certified namespaces that can be invoked in a single transaction
However the number of operations that can be performed in each namespace must not exceed the
pertransaction limits Theres also a limit on the cumulative number of operations that can be made across
namespaces in a transaction This cumulative limit is times the pernamespace limit For example if
the pernamespace limit for SOQL queries is a single transaction can perform up to SOQL
queries In this case the cumulative limit is times the pernamespace limit of These queries can
be performed across an unlimited number of namespaces as long as any one namespace doesnt have
Salesforce Developer Limits and Allocations Quick Reference
Apex Governor Limits
more than queries The cumulative limit doesnt affect limits that are shared across all namespaces
such as the limit on maximum CPU time
Note These crossnamespace limits apply only to namespaces in certified managed packages
Namespaces in packages that are not certified dont have their own separate governor limits The
resources they use continue to count against the same governor limits used by your orgs custom
code
This table lists the cumulative crossnamespace limits
Description
Cumulative
CrossNamespace
Limit
Total number of SOQL queries issued
Total number of records retrieved by DatabasegetQueryLocator
Total number of SOSL queries issued
Total number of DML statements issued
Total number of callouts HTTP requests or Web services calls in a transaction
Total number of sendEmail methods allowed
Lightning Platform Apex Limits
The limits in this table arent specific to an Apex transaction and are enforced by the Lightning Platform
Description
Limit
The maximum number of asynchronous Apex method executions batch
or the number
Apex future methods Queueable Apex and scheduled Apex per a hour of user licenses in your
period
org multiplied by
whichever is greater
Number of synchronous concurrent transactions for longrunning transactions
that last longer than seconds for each org
Maximum number of Apex classes scheduled concurrently
In Developer Edition
orgs the limit is
Maximum number of batch Apex jobs in the Apex flex queue that are in
Holding status
Maximum number of batch Apex jobs queued or active concurrently
Maximum number of batch Apex job start method concurrent executions
Maximum number of batch jobs that can be submitted in a running test
Maximum number of test classes that can be queued per hour period
production orgs other than Developer Edition
The greater of or
multiplied by the
Salesforce Developer Limits and Allocations Quick Reference
Apex Governor Limits
Description
Limit
number of test classes in
the org
Maximum number of test classes that can be queued per hour period
sandbox and Developer Edition orgs
The greater of or
multiplied by the
number of test classes in
the org
Maximum number of query cursors open concurrently per user
Maximum number of query cursors open concurrently per user for the Batch
Apex start method
Maximum number of query cursors open concurrently per user for the Batch
Apex execute and finish methods
Static Apex Limits
Description
Limit
Default timeout of callouts HTTP requests or Web services calls in a
transaction
seconds
Maximum size of callout request or response HTTP request or Web services MB for synchronous
call
Apex or MB for
asynchronous Apex
Maximum SOQL query run time before Salesforce cancels the transaction
seconds
Maximum number of class and trigger code units in a deployment of Apex
For loop list batch size
Maximum number of records returned for a Batch Apex query in
million
DatabaseQueryLocator
SizeSpecific Apex Limits
Description
Limit
Maximum number of characters for a class
million
Maximum number of characters for a trigger
million
Maximum amount of code used by all Apex code in an org
MB
Method size limit
bytecode
instructions in compiled
form
Salesforce Developer Limits and Allocations Quick Reference
API Request Limits and Allocations
Push Notification Limits
The maximum push notifications allowed for each mobile app associated with your Salesforce org depends
on the type of app
Mobile application type
Maximum notifications per app per day
Provided by Salesforce for example Salesforce for
iOS
Developed by your company for internal employee
use
Installed from the AppExchange
API Request Limits and Allocations
Concurrent API Request Limits
Here are the allocations for various types of orgs for concurrent requests calls with a duration of
seconds or longer
Org Type
Limit
Developer Edition and Trial orgs
Production orgs and Sandbox
The following table lists the allocations for the total API requests calls per hour period for an org
Salesforce Edition
API Calls Per License Type
Total Calls Per Hour
Period
Developer Edition
NA
Enterprise Edition
Salesforce
Professional Edition with
API access enabled
Salesforce Platform
number of licenses X
calls per license type up to a
maximum of
Forcecom One App
Customer Community
Customer Community Login
Customer Community Plus
Customer Community Plus
Login
Partner Community
Partner Community Login
Salesforce Developer Limits and Allocations Quick Reference
Salesforce Edition
API Request Limits and Allocations
API Calls Per License Type
Total Calls Per Hour
Period
Lightning Platform Starter
per member for Enterprise
Edition orgs
Lightning Platform Plus
per member for Enterprise
Edition orgs
Unlimited Edition
Salesforce
Performance Edition
Salesforce Platform
number of licenses X
calls per license type
Forcecom One App
Customer Community
Customer Community Login
Customer Community Plus
Customer Community Plus
Login
Partner Community
Partner Community Login
Lightning Platform Starter
per member for Unlimited and
Performance Edition orgs
Lightning Platform Plus
per member for Unlimited and
Performance Edition orgs
Sandbox
NA
Increasing Total API Request Allocations
The calculation of the API request amounts based on user licenses is designed to allow sufficient capacity
for your org based on your number of users If you need a higher amount and you dont want to purchase
extra user licenses or upgrade to Performance Edition you can purchase extra API calls For information
contact your account representative
Before you purchase more API calls perform due diligence of your API usage Client applications whether
it is your own enterprise applications or partner applications that make calls to the API can often be
optimized to use fewer API calls to do the same work If you use a partner product consult with the vendor
to verify that the product makes optimal use of the API A product that makes inefficient use of the API
incurs unnecessary costs for your company
Salesforce Developer Limits and Allocations Quick Reference
Chatter REST API Limits
Length of Stored ThirdParty Refresh and Access Tokens
Salesforce stores up to characters for each thirdparty access token and for each refresh token
Chatter REST API Limits
Limits protect shared resources These are the limits for consumers of Chatter REST API
Chatter REST API requests are subject to rate limiting Chatter REST API has a different rate limit than other
Salesforce APIs Chatter REST API has a per user per application per hour rate limit When you exceed the
rate limit all Chatter REST API resources return a Service Unavailable error code
For applications using a session ID from Salesforce the rate limit is per user per hourthere isnt a separate
bucket for applications All applications the user accesses with a session ID use this general quota To take
advantage of the per user per application per hour limit use OAuth tokens
Note Load performance and other system issues can prevent some limits from being reached
Limits can change without notice Applications should make efficient use of available requests and
gracefully handle the error code
Bulk API Allocations
Bulk API Allocation
Limit Description
Batch Allocation
You can submit up to batches per rolling hour period You
cant create batches associated with a job that is more than hours
old If a batch is submitted to a closed job the batch will not be created
however it will still count against the batch allocation as a submitted
batch
Batch lifespan
Batches and jobs that are older than seven days are removed from the
queue regardless of job status The seven days are measured from the
youngest batch associated with a job or the age of the job if there are
no batches You cant create batches associated with a job that is more
than hours old
Batch size
Batches for data loads can consist of a single CSV XML or JSON
file that is no larger than MB
A batch can contain a maximum of records
A batch can contain a maximum of characters for all
the data in a batch
A field can contain a maximum of characters
A record can contain a maximum of fields
A record can contain a maximum of characters for all its
fields
A batch must contain some content or an error occurs
Salesforce Developer Limits and Allocations Quick Reference
API Query Cursor Limits
Bulk API Allocation
Limit Description
Batch processing time
Batches are processed in chunks The chunk size depends on the API
version In API version and earlier the chunk size is records
In API version and later the chunk size is records Theres a
minute limit for processing each chunk Also if it takes longer than
minutes to process a whole batch the Bulk API places the remainder
of the batch back in the queue for later processing If the Bulk API
continues to exceed the minute limit on subsequent attempts the
batch is placed back in the queue and reprocessed up to times
before the batch is permanently marked as failed
Binary content
The length of any file name cant exceed bytes
A zip file cant exceed MB
The total size of the unzipped content cant exceed MB
A maximum of files can be contained in a zip file Directories
dont count toward this total
Bulk query number of attempts attempts at minutes each to process the batch There is also a
to query
minute limit on the time to process the query If more than
attempts are made for the query an error message of Tried more than
fifteen times is returned If the query takes more than minutes to
process a QUERYTIMEOUT error is returned
Bulk query number of retrieved files If the query needs to return more than files add filters to
files
the query to return less data Bulk batch sizes are not used for bulk
queries
Bulk query results lifespan
days
Bulk query retrieved file size
GB
Job open time
The maximum time that a job can remain open is hours The Bulk
API doesnt support clients that for example post one batch every
hour for many hours
API Query Cursor Limits
A user can have up to query cursors open at a time If QueryLocator cursors are open when a
client application logged in as the same user attempts to open a new one then the oldest of the
cursors is released If the client application attempts to open the released query cursor an error results
Salesforce Developer Limits and Allocations Quick Reference
SOAP API Call Limits
SOAP API Call Limits
API Name
API Limit
Limit Description
create
Maximum
Your client application can add up to records in a single
number of
create call If a create request exceeds objects then
records created the entire operation fails
describeSObjects Maximum
The describeSObjects call is limited to a maximum
of objects returned
number of
objects
returned
emptyRecycleBin Maximum
number of
records in the
Recycle Bin
getDeleted
Limits for
returned
records
Your org can have up to records per license in the
Recycle Bin at any one time For example if your org has five
user licenses records can be stored in the Recycle Bin
If your org reaches its Recycle Bin limit Salesforce automatically
removes the oldest records as long as they have been in the
recycle bin for at least two hours
If your getDeleted call returns more than
records and the user is a system administrator an
exception EXCEEDEDIDLIMIT is returned
If your getDeleted call returns more than
records and the user is not a system administrator an
exception OPERATIONTOOLARGE is returned Note that
this error is returned when more than records
across the organization have been deleted not just the
records viewable by the user
login
Login request
size limit
The login request size is limited to KB
login
Maximum calls The limit is calls to login per user per hour
per user
Exceeding this limit results in a Login Rate Exceeded error
merge
Merge request Up to merge requests can be made in a single SOAP
limits
call
Up to three records can be merged in a single request
including the master record This limit is the same as the
limit enforced by the Salesforce user interface To merge
more than records do a successive merge
External ID fields cannot be used with merge
If you selected the option to retain the most recently
updated data privacy record for merging leads and
contacts but the caller does not have CRUD permission
for the selected data privacy record the merge process
selects the data privacy record already associated with the
master record
Salesforce Developer Limits and Allocations Quick Reference
Metadata Limits
API Name
API Limit
Limit Description
update
Maximum
number of
records
updated
Your client application can change up to records in a
single update call If an update request exceeds
records the entire operation fails
query and
queryMore
Batch size
limits
WSC clients can set the batch size by calling
setQueryOptions on the connection object C client
applications can change this setting by specifying the batch
size in the call QueryOptions portion of the SOAP header
before invoking the query call The maximum batch size
is records However this setting is only a suggestion
There is no guarantee that the requested batch size will be
the actual batch size This is done to maximize performance
The batch size will be no more than if the SOQL statement
selects two or more custom fields of type long text This is to
prevent large SOAP messages from being returned
Metadata Limits
The following limits apply to the Forcecom IDE the Ant Migration Tool and the Metadata API
Limit
Description
Retrieving and
deploying metadata
You can deploy or retrieve up to files at once and the maximum size
of the deployed or retrieved zip file is MB In API version and later
AppExchange packages can contain up to files Note the following
If using the Ant Migration Tool to deploy an unzipped folder all files in
the folder are compressed first The maximum size of uncompressed
components in an unzipped folder is MB or less depending on the
compression ratio If the files have a high compression ratio you can
migrate a total of approximately MB because the compressed size
would be under MB However if the components cant be compressed
much like binary static resources you can migrate less than MB
Metadata API base encodes components after theyre compressed
The resulting zip file cant exceed MB which is the limit for SOAP
messages Base encoding increases the size of the payload so your
compressed payload cant exceed approximately MB before encoding
You can perform a retrieve call for a big object only if its index is
defined If a big object is created in Setup and doesnt yet have an index
defined you cant retrieve it
Change sets
Inbound and outbound change sets can have up to files of metadata
Salesforce Developer Limits and Allocations Quick Reference
SOQL and SOSL Limits
SOQL and SOSL Limits
Feature
Limit
Limit Description
SOQL statements
Maximum length of
SOQL statements
By default characters
Note Long complex SOQL statements such as
statements that contain many formula fields can
sometimes result in a
QUERYTOOCOMPLICATED error The error
occurs because the statement is expanded
internally when processed by Salesforce even
though the original SOQL statement is under the
character limit To avoid this error reduce
the complexity of your SOQL statement
Page layouts in Lightning with more than
fields can also cause a
QUERYTOOCOMPLICATED error Lightning
uses autogenerated SOQL to retrieve fields for a
record page layout so the error can occur even
if there isnt any customerwritten SOQL
The character limit can also be reached by
including too many currency fields Currency fields
require SOQL to use a format method roughly
doubling the field API name length for each
currency field
SOQL WHERE
clause
Maximum length of
SOQL WHERE clause
characters
SOSL statements
Maximum length of
SOSL statements
By default characters This limit is tied to the SOQL
statement character limit defined for your org
SOSL search query
strings
Maximum length of
If the SearchQuery string is longer than
characters no result rows are returned If
SearchQuery is longer than characters any
logical operators are removed For example the AND
operator in a statement with a SearchQuery thats
characters will default to the OR operator which
could return more results than expected
SearchQuery
string
SOSL query results
Maximum rows
returned
Relationship queries Relationship query
limits
results total API version and later unless you
specify custom limits in the query Previous API versions
return results
No more than childtoparent relationships can
be specified in a query A custom object allows up
to relationships so you can reference all the
Salesforce Developer Limits and Allocations Quick Reference
Feature
Visualforce Limits
Limit
Limit Description
childtoparent relationships for a custom object in
one query
No more than parenttochild relationships can
be specified in a query
In each specified relationship no more than five
levels can be specified in a childtoparent
relationship For example
ContactAccountOwnerFirstName
three levels
In each specified relationship only one level of
parenttochild relationship can be specified in a
query For example if the FROM clause specifies
Account the SELECT clause can specify only the
Contact or other objects at that level It could not
specify a child object of Contact
FOR VIEW and FOR
REFERENCE
Maximum
The RecentlyViewed object is updated every time the
RecentlyViewed records loggedin user views or references a record It is also
allowed
updated when records are retrieved using the FOR
VIEW or FOR REFERENCE clause in a SOQL query
To ensure that the most recent data is available
RecentlyViewed data is periodically truncated down to
records per object RecentlyViewed data is retained
for days after which it is removed on a periodic basis
OFFSET clause
Maximum number of
rows skipped by
OFFSET
The maximum offset is rows Requesting an offset
greater than results in a
NUMBEROUTSIDEVALIDRANGE error
Visualforce Limits
Limit
Value
Maximum response size for a Visualforce page
Less than MB
Maximum view state size in a Visualforce page
KB
Maximum size of a Visualforce email template
MB
Maximum file size for a file uploaded using a Visualforce page
MB
Maximum size of HTML response before rendering when Visualforce page Less than MB
is rendered as PDF
Maximum PDF file size for a Visualforce page rendered as a PDF
MB
Maximum total size of all images included in a Visualforce page rendered MB
as a PDF
Salesforce Developer Limits and Allocations Quick Reference
Visualforce Limits
Limit
Value
Maximum request size of a JavaScript remoting call
MB
Maximum response size of a JavaScript remoting call
MB
Default timeout for a JavaScript remoting call
milliseconds
seconds
Maximum timeout for a JavaScript remoting call
milliseconds
seconds
Maximum rows retrieved by queries for a single Visualforce page request
Maximum rows retrieved by queries for a single Visualforce page request
in readonly mode
Maximum collection items that can be iterated in an iteration component
such as apexpageBlockTable and apexrepeat
Maximum collection items that can be iterated in an iteration component
such as apexpageBlockTable and apexrepeat in
readonly mode
Maximum field sets that can be displayed on a single Visualforce page
Maximum field sets allowed per Salesforce org
Maximum fields through lookup relationships allowed per field set
Maximum records that can be handled by StandardSetController