Question: 1
Which option would a developer use to display the Accounts created in the current week and the number of related Contacts using a debug statement in Apex?
A For(Account acc: [SELECT Id, Name,(SELECT Id, Name FROM Contacts) FROM Account WHERE CreatedDate = THIS_WEEK]) { List cons = acc.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'; }
B For(Account acc: [SELECT Id, Name, (SELECT Id, Name FROM Contacts) FROM Account WHERE CreatedDate = CURRENT_WEEK]){ List cons = acc.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'); }
C For(Account acc:[SELECT Id, Name, Account.Contacts FROM Account WHERE CreatedDate = CURRENT_WEEK]) { List cons = acc.Account.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'); }
D For(Account acc: [SELECT Id, Name, Account.Contacts FROM Account WHERE CreatedDate = THIS_WEEK]){ List cons = acc.Account.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts' }
Answer : A
Show Answer
Hide Answer
Question: 2
A candidate may apply to multiple jobs at the company Universal Containers by submtting a single application per job posting. Once an application is submitted for a job posting, that application cannot be modified to be
resubmitted to a different job posting.What can the administrator do to associate an application with each job posting in the schema for the organization?
Question: 3
A developer is creating an application to track engines and their parts. An individual part can be used in different types of engines. What data model should be used to track the data and to prevent orphan records?
Question: 4
Which declarative method helps ensure quality data? (Choose 3)
Question: 5
How would a developer determine if a CustomObject__c record has been manually shared with the current user in Apex?