{"id":180,"date":"2018-02-14T09:52:37","date_gmt":"2018-02-14T04:22:37","guid":{"rendered":"http:\/\/blog.tenthplanet.in\/?p=180"},"modified":"2026-03-03T10:15:45","modified_gmt":"2026-03-03T10:15:45","slug":"what-are-governor-limits-in-force-com-custom-app-development","status":"publish","type":"post","link":"https:\/\/tenthplanet.in\/blogs\/what-are-governor-limits-in-force-com-custom-app-development\/","title":{"rendered":"What are Governor Limits in Force.com Custom App Development?"},"content":{"rendered":"<p>Governor Limits in Force.com Custom App Development are Salesforce\u2019s way of forcing you to write efficient, scalable code.<br \/>\nThe 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.<\/p>\n<p>This table lists limits for synchronous and asynchronous Apex (Batch Apex and future methods) when they\u2019re different. Otherwise, this table lists only one limit that applies to both synchronous and asynchronous Apex.<\/p>\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">\n<colgroup>\n<col width=\"151*\" \/>\n<col width=\"51*\" \/>\n<col width=\"55*\" \/> <\/colgroup>\n<tbody>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"17\">\n<p align=\"CENTER\"><span style=\"font-family: Calibri\"><b>Description<\/b><\/span><\/p>\n<\/td>\n<td bgcolor=\"#ffffff\" width=\"20%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\"><b>Synchronous Limit<\/b><\/span><\/p>\n<\/td>\n<td bgcolor=\"#ffffff\" width=\"21%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\"><b>Asynchronous Limit<\/b><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total number of SOQL queries issued\u00a0(This limit doesn\u2019t apply to custom metadata types. In a single Apex transaction, custom metadata records can have unlimited SOQL queries.)<\/span><\/p>\n<\/td>\n<td bgcolor=\"#ffffff\" width=\"20%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">100<\/span><\/p>\n<\/td>\n<td bgcolor=\"#ffffff\" width=\"21%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">200<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total number of records retrieved by SOQL queries<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">50000<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total number of records retrieved by\u00a0Database.getQueryLocator<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">10000<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total number of SOSL queries issued<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">20<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total number of records retrieved by a single SOSL query<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">2000<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total number of DML statements issued<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">150<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total number of records processed as a result of DML statements,\u00a0Approval.process, or\u00a0database.emptyRecycleBin<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">10000<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total stack depth for any Apex invocation that recursively fires triggers due to\u00a0insert, update, or\u00a0delete\u00a0statements<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">16<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total number of callouts (HTTP requests or Web services calls) in a transaction<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">100<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Maximum cumulative timeout for all callouts (HTTP requests or Web services calls) in a transaction<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">120 seconds<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Maximum number of methods with the\u00a0future\u00a0annotation allowed per Apex invocation<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">50<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Maximum number of Apex jobs added to the queue with\u00a0System.enqueueJob<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">50<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total number of\u00a0sendEmail\u00a0methods allowed<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">10<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"26\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Total heap size4<\/span><\/p>\n<\/td>\n<td bgcolor=\"#ffffff\" width=\"20%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">6 MB<\/span><\/p>\n<\/td>\n<td bgcolor=\"#ffffff\" width=\"21%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">12 MB<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"26\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Maximum CPU time on the Salesforce servers5<\/span><\/p>\n<\/td>\n<td bgcolor=\"#ffffff\" width=\"20%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">10,000 milliseconds<\/span><\/p>\n<\/td>\n<td bgcolor=\"#ffffff\" width=\"21%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">60,000 milliseconds<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Maximum execution time for each Apex transaction<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">10 minutes<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"18\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Maximum number of push notification method calls allowed per Apex transaction<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">10<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td bgcolor=\"#ffffff\" width=\"59%\" height=\"17\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">Maximum number of push notifications that can be sent in each push notification method call<\/span><\/p>\n<\/td>\n<td colspan=\"2\" bgcolor=\"#ffffff\" width=\"41%\">\n<p align=\"LEFT\"><span style=\"font-family: Calibri\">2000<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Governor limits are Salesforce\u2019s way of forcing you to write efficient, scalable code.<\/p>\n","protected":false},"author":23,"featured_media":1077,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[14,15],"class_list":["post-180","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-salesforce","tag-custom-app","tag-force-com"],"_links":{"self":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/comments?post=180"}],"version-history":[{"count":0,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/media\/1077"}],"wp:attachment":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/tags?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}