EXCEEDED_ID_LIMIT: emptyRecycleBin id limit reached: 200

只谈情不闲聊 提交于 2019-12-11 17:14:53

问题


I'm just wondering if anyone else has seen this and if so, can you confirm that this is correct? The documentation claims, as you might expect, that 10,000 is the record limit for the system call:

Database.emptyRecycleBin(records);

not 200. Yet it's throwing an error at 200. The only thing I can think of is that this call occurs from within a batch Apex process.


回答1:


This is the only reference that I could find to there being a limit of 200 on emptyrecyclebin(), I dare say that you are correct

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_emptyrecyclebin.htm




回答2:


It took a little over a week and me supplying a failing test case to salesforce support but the issue is now being reported as a salesforce known issue suggesting it may get addressed in the platform.

My workaround for now is to wrap the call in a Database.Batchable with the batch size to 200.




回答3:


Adam, if you got shut down when attempting to log a case regarding this due to the whole Premier Support thing you should definitely escalate your case as it was handled incorrectly and SFDC needs to know about it. I had the same exact issue myself.




回答4:


SOQL For Loops may be a helpful option for working around this limit as the 'for (Account[] accounts : [SELECT Id FROM Account WHERE IsDeleted = true ALL ROWS]' format provides batches of 200.



来源:https://stackoverflow.com/questions/9352149/exceeded-id-limit-emptyrecyclebin-id-limit-reached-200

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!