Question 81

After a Platform Event is defined in a Salesforce org, events can be published via which two mechanisms? Choose 2 answers
  • Question 82

    A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey-c records are being created per Case. trigger CaseTrigger on Case (after insert, after update) { List<Survey__c> createSurveys = new List<Survey__c>(); for (Case c :
    trigger.new) { if (c.IsClosed && (trigger.isInsert ll trigger.isUpdate && trigger.oldMap.get(c.Id).IsClosed == false)) { createSurveys.add(new Survey__c(Case__c = c.Id)); insert createSurveys; } } What could be the cause of this issue?
  • Question 83

    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?
  • Question 84

    A developer has working business logic code, but sees the following error in the test class:
    You have uncommitted work pending. Please commit or rollback before calling out. What is a possible solution?
  • Question 85

    [FIND 'map' IN ALL FIELDS RETURNING Account (Id, Name), Contact, Opportunity, Lead] What is a valid return type for the following SOSL query?