Free Certified Platform Developer II Exam Braindumps (page: 11)

Page 11 of 90

Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?

  1. insert (records, false)
  2. Database.insert(records, false)
  3. Database.insert(records, true)
  4. insert records

Answer(s): B



Which two relationship queries use the proper syntax? (Choose two.)

  1. SELECT Id, Name, Account r.Name FROM Contact WHERE Account r.Industry = 'Media'
  2. SELECT Name, (SELECT LastName FROM Contacts r) FROM Account
  3. SELECT Name, (SELECT LastName FROM Contacts) FROM Account
  4. SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = 'Media'

Answer(s): C,D



A developer built a Component to be used at the front desk for quests to self-register upon arrival at a kiosk. The developer is now asked to create a Component for the Utility Tray to alert Users whenever a guest has arrived at the front desk.
What should be used?

  1. Application Event
  2. DML Operation
  3. Component Event
  4. ChangeLog

Answer(s): A



Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity’s Account?

  1. List <Contact> contactList = new List <Contact>();
    for(Opportunity o : opportunityList){
    Account a = [SELECT Id, (SELECT Id FROM Contacts) FROM Account WHERE Id = :o.AccountId]
    contactList.addAll(a.Contacts);
    )
  2. List <Contact> contactList = new List <Contact>();
    Set <Id> accountIds = new Set <Id> ();
    for (Opportunity o : opportunityList){
    contactIds.add(o.ContactId);
    }
    for(Contact c : [SELECT Id FROM Contact WHERE Id IN :contactIds]){
    contactList.add(c);
    }
  3. List <Contact> contactList = new List <Contact>();
    Set <Id> accountIds = new Set <Id> ();
    for(Opportunity o : opportunityList){
    accountIds.add(o.AccountId);
    }
    for(Account a : [SELECT Id, (SELECT Id FROM Contacts) FROM Account WHERE Id IN :accountIds]){
    contactList.addAll(a.Contacts);
    }
  4. List <Contact> contactList = new List <Contact>();
    for ( Contact c : [SELECT Id FROM Contact WHERE AccountId IN :opportunityList.AccountId] ){
    contactList.add(c);
    }

Answer(s): C



Page 11 of 90



Post your Comments and Discuss Salesforce Certified Platform Developer II exam with other Community members:

Jenil Gandhi commented on November 14, 2024
Hi everyone could sone share the certification voucher for PD2.
INDIA
upvote

Aniq commented on December 02, 2023
Hi every one Could some share the certification voucher for PD2
Anonymous
upvote

Rasheed commented on June 07, 2023
Worth the price. I got 50% off when I selected 2 exams.
PAKISTAN
upvote

Lisha commented on September 21, 2022
Thank you!
Anonymous
upvote