Question 1mediummultiple choice
Read the full Advanced Developer Fundamentals explanation →SF-PD2 Advanced Developer Fundamentals • Complete Question Bank
Complete SF-PD2 Advanced Developer Fundamentals question bank — all 0 questions with answers and detailed explanations.
{
"query": "SELECT Id, Account.Name FROM Contact WHERE Email != NULL",
"error": "System.QueryException: Aggregate expression cannot be used in a WHERE clause"
}{
"class": "BatchProcessor",
"method": "execute",
"log": "Database.Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: MyTrigger: execution of AfterUpdate... System.LimitException: Too many SOQL queries: 101"
}{
"Code": "public class DataManager {\n private static List<Account> cache;\n public static List<Account> getAccounts() {\n if (cache == null) {\n cache = [SELECT Id, Name FROM Account LIMIT 100];\n }\n return cache;\n }\n}"
}{
"apex_class": "PolicyService",
"method": "processRecords",
"error": "System.LimitException: Too many SOQL queries: 101"
}{
"apex_code": "public void updateAccount(Id accId) {
Account acc = [SELECT Id, Name FROM Account WHERE Id = :accId];
acc.Name = 'New Name';
update acc;
}"
}{
"ApexClass": {
"Name": "AccountService",
"SharingModel": "With Sharing",
"Method": "process(List<Account> accounts)",
"SecurityCheck": "Schema.sObjectType.Account.isUpdateable()"
}
}{
"Code": "HttpRequest req = new HttpRequest();\nreq.setEndpoint('callout:MyNamedCred/api/data');\nreq.setMethod('POST');\nreq.setBody(JSON.serialize(payload));\nHttp h = new Http();\nHttpResponse res = h.send(req);"
}