Hot answers tagged

3 votes

Queries on Large Object (>1 million rows) Fail to Execute

First, a full recycle bin can cause problems, because IsDeleted is not indexed. Consider hard-deleting records as you delete them with the emptyRecycleBin function. I suspect the Queueable is probably ...
user avatar
  • 434k
2 votes
Accepted

Test Class Out of Bounds Exception

In unit tests, there are 3 phases. Create test data Execute the method you want to test Gather the results, and make assertions You're doing #2 and #3, but you've skipped over #1. You are ...
user avatar
  • 48.3k
1 vote

Illegal assignment from account to id

Here is the updated code with comments for fixes. The primary fix is to ensure that you assign the ID of the Account as the AccountId, rather than attempting to assign the Account record itself (which ...
user avatar
  • 958
1 vote

Aggregate result not working in soql query

AggregateResult objects are treated like sObject objects; you can't access any of the fields directly with the dot-notation, but instead you need to use the dynamic notation. <td> <apex:...
user avatar
  • 434k

Only top scored, non community-wiki answers of a minimum length are eligible