必威体育Betway必威体育官网
当前位置:首页 > IT技术

Salesforce常见的限制Limitations总结

时间:2019-08-21 20:41:04来源:IT技术作者:seo实验室小编阅读:88次「手机版」
 

limitations

26、【SOSL搜索字符长度必须大于1】

search term must be longer than one character

25、Trigger递归深度限制16】execution Governors and limits

Total stack depth for any Apex invocation that recursively fires triggers due to insert, update, or delete statements is 16

24、【View State 170k限制】:'Maximum view state size limit (170KB) exceeded' ERROR message

23、【标准字段历史跟踪有效期为18月】:FAT<field audit Tracking Limitaion>

限制条款:一旦字段历史跟踪达到了18月限制,sf会提供Data Loader / API(Query All)来让你继续访问历史跟踪数据,最多延期6个月,共计24个月。

解决方案:购买FAT add-on license, sf可以保存历史数据最多10年。

22、【自定义对象对象参考 个数限制 - 15】:公式字段

Solution: 提Case扩展Limit | 官方文档

21. 【Sandbox Licenses and Storage by Type】: Link

20. 【List View展示的最大列数为15个】:

19. 【Recycle Bin最多保存删除的数据15天】:remain 15 days

18. 【1个Custom Report Type最多添加4个相关对象】:最多3个子对象

17. 【Home Page上最多显示3个dashboard Snapshots】:salesforce Report & Dashboard进阶篇 - 原理浅析

16. 【Import Wizards与Data Loader比较】:When to Use Data Loader

1. Import Wizard -> import up to 5w records;

2. Data Loader -> up to 500w(5 million) records;

3. work with a Salesforce partner or visit the APPExchange for a suitable partner product -> for more than 500w records.

15. 【database.query与database.getQueryLocator】:

database.query in Salesforce: dynamic SOQL query. You can build up a string and then use that as a query string at run time in the database.query statement to make a SOQL call that is determined at run time. In BATch Apex, if you use Database.query(), it supports 50,000 records only.

database.getQueryLocator in Salesforce returns a Query Locator that runs your selected SOQL query returning list that can be iterated over in batch apex or used for displaying large sets in VF (allowing things such as pagination). In Batch Apex, if you use Database.getQueryLocator(), it supports upto 50 million records.

14. 【字段集Field SetLimitation: The total number of spans in the Field Set can't exceed 25】

13. 【child-to-parent soql最多5级查询】:

Exp: Contact.Account.Owner.FirstName(5 levels).

12. 【parent-to-child soql最多只能嵌套1级子查询】

11. 【You can add up to 300 fields per custom setting

10. 【调试日志记录最大250M,超出时需要手动删除】

9. 【25 ExternalIDs are allowed per object】:Maximum number of External IDs per object or entity

8. 【The maximum size of email attachment is 3 MB when using attach file in a custom email】:

Attach a file to an email template | Send Emails With Attachment in code

7. 【Apex Limits】:

Salesforce Governor Limits:


As you aware that, Salesforce is multitenant platform. Multitenant is a software architecture in which a single instance of software runs on a server and serves multiple user groups. Group of users who share a common access with specific privileges to the software instance.

Governor execution limits ensure the efficient use of resources on the Force.com multitenant platform. Because Apex runs in a multitenant environment, the Apex runtime engine strictly enforces limits to ensure that runaway Apex code or processes don’t monopolize shared resources. If some Apex code ever exceeds a limit, the associated governor issues a runtime exception that cannot be handled.

The Apex limits, or governors, track and enforce the statistics outlined in the following tables and sections.

  • Per-transaction Apex Limits
  • Per-Transaction Certified Managed Package Limits
  • Force.com Platform Apex Limits
  • Static Apex Limits
  • Size-Specific Apex Limits
  • Miscellaneous Apex Limits

In this blog, I have added few of the Governer Limits mentioned below:

1.Total number of SOQL queries issued: 

  •    Synchronous Limit = 100
  •    Asynchronous Limit = 200

2. Total number of records retrieved by SOQL queries : 50,000

【父查子情况下SOQL查询的限制计算Sample】:

a. 假设我们有50000条Account,然后在其中一条单子下创建一个Contact记录;

b. 为增强Demo效果,我们对Account加上Limit 50000的限制,整个Soql如下所示:

List<Account> accList = [SELECT Id, (SELECT Id FROM Contacts) FROM Account LIMIT 50000];

c.经过匿名执行的验证,我们观察到下图效果:

d. 结论:soql查询不仅仅受限于查询主体的数目,还得考虑所有相关的查询记录数;

【子查父情况下SOQL查询的限制计算Sample】:

a. 假设我们有50001条Account,然后我们将第一条Account设定为最后一条单子的Parent Account;

b. 同样的,我们对Account查询主体加上Limit 50000的限制,整个Soql如下所示:

List<Account> accList = [SELECT Id, Parent.Id FROM Account LIMIT 50000];

c. 最终执行的结果是返回50000条Account,没有超限;

最终结论】:

我们通过对比上述科学验证的结果发现,父查子增加的实际是行,而子查父实际增加的是列,所以行限制精确表述的魅力亦在      于此;

3. Total number of records retrieved by Database.getQueryLocator : 10,000

4. Total number of SOSL queries issued : 20

5. Total number of records retrieved by a single SOSL query : 2,000

6. Total number of DML statements issued : 150

7. Total number of callouts : 100 (include Web Service and HTTP request calls in a transaction)

【最新理解】:

以上程序有效控制住了Per-Transaction Apex Limits,由此可见异步方法每调用一次单独开一个新事务;

8. Maximum timeout for all callouts : 120 seconds or 2 minutes (include Web Service and HTTP Request calls in a transaction)

9. Maximum number of @future annotation methods allowed : 50

【测试如下】:

10. Maximum number of Apex jobs added to the queue with System.enqueueJob : 50

11. Total number of sendEmail methods allowed : 10

12. Total heap size : 6 MB or 12 MB

13. Maximum execution time for each Apex transaction : 600 seconds or 10 minutes

14. Maximum number of push notification method calls allowed per Apex transaction : 10

15. Maximum number of push notifications that can be sent in each push notification method call : 2,000

16. Email services heap size is 36 MB.

17. The maximum number of asynchronous Apex method executions per a 24-hour period : 250,000 or the number of user licenses in your organization multiplied by 200, whichever is greater.

18. Maximum number of Apex classes scheduled concurrently : 100

19. Maximum number of batch Apex jobs in the Apex flex queue that are in Holding status : 100

20. Maximum number of batch Apex jobs queued or active concurrently : 5

21. Event Reports : The maximum number of records that an event report returns for a user who is not a system adMinistrator is 20,000; for system administrators, 100,000.

22. inbound Email Services: Maximum Number of Email Messages Processed : Number of user licenses multiplied by 1,000; maximum 1,000,000

23. Inbound Email Services: Maximum Size of Email Message : 10 MB

There are some Size-Specific Apex Limits. Check below:

1. Maximum number of characters for a class : 1 million

2. Maximum number of characters for a trigger : 1 million

3. Maximum amount of code used by all Apex code in an organization : 3 MB

4. Method size limit : 65,535 bytecode instructions in compiled form

6. 【up to 10 Apex sharing reasons per custom objectSalesforce Apex Sharing Reason

Note: Sharing reason just exist in Custom Object not in Std Object.

5. 【Multi-Picklist的可见行不能超过10个】

4. 【字段历史跟踪Field History Track的最大个数为20】

Note: 超出后提Case不能额外加,可以联系业务经理按需购买。

3. 【Per object最多2个Master-detail field】

2. 【Per object最多25个Lookup field】

1. 【Picklist值不能超过1000 / Multi-Picklist值不能超过500】:当然你可以通过提Case要求开放阈值

相关阅读

微信公众号转载文章怎么修改?操作修改有条件限制吗?

俗话说天下文章一大抄,谁改编的好谁的文章就会获得更好的流量和转发关注,当然还有一些人员在操作文章转发的时候直接将原创据为己有

Jquery datepicker限制输入的小技巧

PS:需要限制键盘输入的童鞋请看本文结尾部分 Jquery的datepicker是常用的网页日期选择控件,相对也很简单,但仍有一些问题会让萌新感

淘宝账户被冻结限制登录吗?怎么处理?

由于淘宝时刻都在对淘宝网上的卖家进行监管,很多卖家登录自己的账号时时常会碰到各种问题,有些朋友想问,账号被冻结了,会被限制登录吗

老版迅雷5.8无限制经典版

迅雷5.8不升级版是一款经典热门的P2P下载工具。迅雷5.8去广告绿色版已完全对弹出式广告进行屏蔽,并自动开启高速下载通道,支持磁力

天猫直播时间限制吗?怎么提高直播人气?

买家可以通过观看天猫直播来了解店铺里的宝贝,而且直播的过程中还会发放很多的优惠券,很多的人就在问了,天猫直播时间限制吗?大家若

分享到:

栏目导航

推荐阅读

热门阅读