0% found this document useful (0 votes)
35 views48 pages

Test

The document contains a series of practice questions related to Salesforce development, covering topics such as SOSL and SOQL queries, automation tools, data relationships, and Apex programming. Each question includes multiple-choice answers, with feedback provided for correct and incorrect responses. The document serves as a study guide for individuals preparing for Salesforce certification or improving their development skills.

Uploaded by

jicam94401
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views48 pages

Test

The document contains a series of practice questions related to Salesforce development, covering topics such as SOSL and SOQL queries, automation tools, data relationships, and Apex programming. Each question includes multiple-choice answers, with feedback provided for correct and incorrect responses. The document serves as a study guide for individuals preparing for Salesforce certification or improving their development skills.

Uploaded by

jicam94401
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

What is your current profession?

Student

Employee

Freelancer

Other

PD1 Practice Questions 32 of 120 points

1. A developer needs to write a method that searches for a phone number 0/2
that could be on multiple object types. Which method should the developer
use to accomplish this task?

SOSL Search that includes ALL ROWS

SOSL Search

SOQL Query on each object

SOQL Query that includes ALL ROWS

Correct answer

SOSL Search

Feedback

Wrong Answer`
2. Universal Containers (UC) has an integration with its Accounting system 0/2
that creates tens of ------ Salesforce in a nightly batch. UC wants to add
automation that can attempt to match Leads ------- Using the Email Address
field on the insert. UC is concerned about the performance of the -------
Which tool should UC use to automate this process?

Apex

Process Builder with an Autolaunched Flow

Workflow Rules

Process Builder

Correct answer

Process Builder with an Autolaunched Flow

Feedback

Wrong Answer`
3. What should a developer use to implement an automatic Approval 0/2
Process Submission for Cases?

A workflow rule

Process builder

Scheduled Apex

An Assignment rule

Correct answer

Process builder

Feedback

Wrong Answer`
4. A candidate may apply to multiple jobs at the company Universal 2/2
containers by submitting 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?

Create a master-detail relationship in the Application custom object to the Job


Postings custom object.

Create a lookup relationship on both objects to a junction object called Job Posting
Applications

Create a master-detail relationship in the Job Postings custom object to the


Applications custom object.

Create a lookup relationship in the Applications custom object to the Job Postings
custom object.

Feedback

You're an expert!
5. Which declarative method helps ensure quality data? (Choose 3 0/2
answers)

Exception Handling

Workflow Alerts

Validation Rules

Lookup Filters

Page Layouts

Correct answer

Validation Rules

Lookup Filters

Page Layouts

Feedback

Wrong Answer`
6. An org has different Apex classes that provide Account-related 0/2
functionality. After a new validation rule is added to the Account object,
many of the test methods fail. What can be done to resolve the failures and
reduce the number of code changes needed for future validation rules?
(Choose 2 answers)

Create a method that creates valid Account records & call this method from
within test methods

Create a method that loads valid account records from a static resource, and call
this method within test methods

Create a method that performs a callout for a valid Account record, and call this
method from within the test methods

Create a method that queries for valid account records and call this methos from
within test methods

Correct answer

Create a method that creates valid Account records & call this method from within
test methods

Create a method that loads valid account records from a static resource, and call
this method within test methods

Feedback

Wrong Answer`
7. In a single record, a user selects multiple values from a multi-select 0/2
picklist. How are the selected values represented in Apex?

As a set<String> with each value as an element in the set

As a list<String> with each value as an element in the list

As a string with each value separated by a semi colon

As a string with each value separated by a semi comma

Correct answer

As a string with each value separated by a semi colon

Feedback

Wrong Answer`
8. A user selects a value from a multi-select picklist. How is this selected 0/2
value represented in Apex?

As a string ending with a comma

As a string

As a list<String> with one element

As a set<string> with one element

Correct answer

As a string

Feedback

Wrong Answer`

9. What would a developer do to update a picklist field on related 2/2


Opportunity records when a modification to the associated Account record
is detected?

Create a process with Process Builder

Create a workflow rule with a field update

Create a lightning component.

Create a Visualforce page.

Feedback

You're an expert!
10. In a single record, a user selects multiple values form a multi-select 0/2
picklist. How are the selected values represented in Apex?

As a String with each value separated by a comma.

As a List<String> with each value as an element in the list.

As a String with each value separated by a semicolon

As a Set<String> with each value as an element in the set.

Correct answer

As a String with each value separated by a semicolon

Feedback

Wrong Answer`

11. How can a custom type be identified as unique when added to a set ? 0/2

The class must have a method with the @InvocableMethod annotation

The class must implement the Equals and Hashcode methods

Methods in the class must be static

Methods in the class must be global

Correct answer

The class must implement the Equals and Hashcode methods

Feedback

Wrong Answer`
12. Which collection type provides unique key/value pairings of data? 0/2

List

Map

Array

Set

Correct answer

Map

Feedback

Wrong Answer`
13. An Org has a single account named ’NoContacts’ that has no related 0/2
contacts. Given the query:List&lt;Account&gt; accounts = [Select ID, (Select
ID, Name from contacts) from Account where Name=“NoContacts’];

Accounts[0] is Null.

Accounts[0] contacts is invalid Apex.

Accounts[0] contacts is an empty list.

A QueryException is thrown

Correct answer

Accounts[0] contacts is an empty list.

Feedback

Wrong Answer`
14, Which two Apex data types can be used to reference a Salesforce 0/2
record ID Dynamically? (Choose two answers)

String

External ID

sObject

ENUM

Correct answer

String

sObject

Feedback

Wrong Answer`
15. A method is passed a list of generic sobjects as a parameter. What 0/2
should the developer do to determine which object type (Account, Lead,
Contact , for example ) to cast each sObject ?

Use a try-catch construct to cast the sObject into one of the three sObject
types.

Use the first three characters of the sObject ID to determine the sObject type

Use the getSObjectName method on the sObject class to get the sObject name

Use the getSObjectType method on each generic sOBbect to retrieve the sObject
token

Correct answer

Use the getSObjectType method on each generic sOBbect to retrieve the sObject
token

Feedback

Wrong Answer`
16. What is the value of x after the code segment executes? String x = ‘A’; 2/2
Integer i = 10; if(i<15){ i=15; x = ‘B’; }else if(i<20) { X = ‘C’; }else { X = ‘D’; }

Feedback

You're an expert!

17. When the number of records in a recordset is unknown which control 0/2
statement should a developer use to implement set of code that executes
for every record in the recordset, without performing a .size() or .length()
method call?

For(init_stmt;exit_condition;increment_stmt){…}

Do{…}while(condition)

For (variable : list_or_set){…}

While(condition) {..}

Correct answer

For (variable : list_or_set){…}

Feedback

Wrong Answer`
18. Which code segment can be used to control when the dowork() 0/2
method is called?

For (triggerIsRunning t : trigger.new) { dowork(); }

If(trigger.IsRunning){dowork();}

For(trigger.IsInsert t : trigger.new){dowork();}

If(trigger.IsInsert){dowork();}

Correct answer

If(trigger.IsInsert){dowork();}

Feedback

Wrong Answer`
19. A developer is creating test coverage for a class and needs to insert 0/2
records to validate functionality. Which method annotation should be used
to create records for every method in the test class?

@isTest(SeeAllDate=true)

@PreTest

@TestSetup

@BeforeTest

Correct answer

@TestSetup

Feedback

Wrong Answer`
20. What are three characteristics of static methods? (Choose 2 answers) 0/2

Initialized only when a class is loaded

A static variable is available outside of the cope of an Apex transaction

Allowed only in outer classes

Allowed only in inner classes

Correct answer

Initialized only when a class is loaded

Allowed only in outer classes

Feedback

Wrong Answer`
21. A developer wants to display all of the available record types for a Case 0/2
object. The developer also wants to display the picklist values for the
Case.Status field. The Case object and the Case.Status field are on a
custom VF page. Which action can the developer perform to get the record
types and picklist values in the controller?(Choose 2 answers)

Use Schema.PicklistEntry returned by Case Status


getDescribe().getPicklistValues()

Use Schema.RecordTypeInfo returned by


Case.SObjectType.getDescribe().getRecordTypeInfos()

Use SOQL to query Case records in the org to get all the RecordType values
available for Case.

Use SOQL to query Case records in the org to get all the values for the Status
picklist field.

Correct answer

Use Schema.PicklistEntry returned by Case Status


getDescribe().getPicklistValues()

Use Schema.RecordTypeInfo returned by


Case.SObjectType.getDescribe().getRecordTypeInfos()

Feedback

Wrong Answer`
22. Which type of information is provided by the Checkpoints tab in the 0/2
Developer Console? (Choose 2 answers)

Exception

Debug Statement

Namespace

Time

Correct answer

Exception

Namespace

Feedback

Wrong Answer`
23. What is a valid source and destination pair that can send or receive 0/2
change sets? (Choose 2 answers)

Sandbox to Production

Developer Edition to Sandbox

Developer Edition to Production

Sandbox to Sandbox

Correct answer

Sandbox to Production

Sandbox to Sandbox

Feedback

Wrong Answer`
24. What should a developer working in a sandbox use to exercise a new 0/2
test class before the developer class to production? (Choose 2 answers)

The REST API and ApexTestRun method.

The Apex Test Execution page in Salesforce setup.

The Test menu in the Developer console.

The Run Tests page in Salesforce setup.

Correct answer

The Apex Test Execution page in Salesforce setup.

The Test menu in the Developer console.

Feedback

Wrong Answer`
25. What is true of a partial sandbox that is not true of a full sandbox? 0/2

More frequent refreshes.

Only includes necessary metadata

Use of change sets.

Limited to 5 GB of data.

Correct answer

Only includes necessary metadata

Feedback

Wrong Answer`
26. Which three tools can deploy metadata to productions? (Choose 3 0/2
answers)

Data Loader

Change set from sandbox

Change set from developer org

Force.com IDE

Metadata API

Correct answer

Change set from sandbox

Force.com IDE

Metadata API

Feedback

Wrong Answer`
27. Before putting an app into production, which step should be taken? 2/2

Run the production check feature via the web interface

Switch to a production database

Insure that you have installed a performance introspection add-on

Scale your dynos

Feedback

You're an expert!

28. What are two testing considerations when deploying code from a 0/2
sandbox to production? (Choose 2 answers)

Apex Code requires 100% coverage.

75% of tests must execute without failure.

100% of tests must execute without failure.

Apex Code requires 75% coverage.

Correct answer

100% of tests must execute without failure.

Apex Code requires 75% coverage.

Feedback

Wrong Answer`
29. Which user can edit a record after it has been locked for approval? 0/2
(Choose 2 answers)

An administrator

Any user who approved the record previously.

A user who is assigned as the current approver.

Any user with a higher role in the hierarchy.

Correct answer

An administrator

A user who is assigned as the current approver.

Feedback

Wrong Answer`
30. In which two org types can a developer create new Apex classes? 0/2
(Choose 2 answers)

Unlimited Edition

Enterprise Edition

Developer Edition

Sandbox

Correct answer

Developer Edition

Sandbox

Feedback

Wrong Answer`
31. What are two ways a developer should deploy code from a developer 0/2
org to an unrelated production org? (Choose 2 answers)

Login to the production org and set the developer org as an inbound connection
in the Deployment Settings screen.

Setup a Salesforce to Salesforce connection and deploy a Change Set.

Save the code to a folder on the developer’s computer, create an incoming Change
Set in the production org, and upload the files directly.

Package the code as an unmanaged package and install it in the production org.

Use an IDE to upload the new code directly into the production org using the
metadata API

Correct answer

Package the code as an unmanaged package and install it in the production org.

Use an IDE to upload the new code directly into the production org using the
metadata API

Feedback

Wrong Answer`
32. A developer is creating an application to track engines and their parts. 2/2
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?

Create a junction object to relate many engines to many parts through a


master-detail relationship.

Create a master-detail relationship to represent the one-to-many model of engines


to parts.

Create a lookup relationship to represent how each part relates to the parent engine
object

Create a junction object to relate many engines to many parts through a lookup
relationship.

Feedback

You're an expert!

33. Which data structure is returned to a developer when performing a 2/2


SOSL search?

A list of lists of sObjects.

A map of sObject types to a list of sObjects.

A map of sObject types to a list of lists of sObjects.

A list of sObjects.

Feedback

You're an expert!
34. How would a developer use Schema Builder to delete a custom to 0/2
delete a custom field from the Account object that was required for
prototyping but is no longer needed?

Remove all the references in the code and then the field will be removed from
Schema Builder.

Remove all references from the code and then delete the custom field from
Schema Builder.

Mark the field for deletion in Schema Builder and then delete it from the declarative
UI.

Delete the field from Schema Builder and then all references in the code will be
removed.

Correct answer

Remove all references from the code and then delete the custom field from Schema
Builder.

Feedback

Wrong Answer`
35. Using the schema builder, a developer tries to change the API name of 0/2
a field that is referenced inan Apex Test Class. What is the end results?

The API name of the field is changed, and a warning is issued to update the
class

The API name of the field and the reference in the test class is updated

The API name of the field and the reference in the test class is changed

The API name is not changed and there are no other impacts.

Correct answer

The API name is not changed and there are no other impacts.

Feedback

Wrong Answer`

36. What is the output of the following code ?Integer index = 1;Integer 2/2
counter = 2;do { System.debug(index); index++; counter++;
} while (index ==20 "counter == 21);

The debug statement will output 1

The debug statement will repeat outputs from 1 to 21

The debug statement will report outputs from 1 to 20

The debug statement will will outupt 20

Feedback

You're an expert!
37. A developer writes the following code :List<Account> acc = { SELECT Id 0/2
FROM Account LIMIT 10 };Delete
acc;System.Debug(Limits.getDMLStatements() + ' , '+
Limits.getLimitDMLstatements() };What is the result of this debug
statement ?

2150

1150

2200

1100

Correct answer

1150

Feedback

Wrong Answer`
38. Given the code block:Integer x;for (x = 0; x<10; x+=2)( if(x==8) 0/2
break; if(x==10) break;)system,debug(x);Which value will the system,
debug statement display?

10

Correct answer

Feedback

Wrong Answer`
39. What are two valid options for iterating through each Account in the 0/2
collection List&lt;Account&gt; named AccountList? (Choose 2 answers)

for (Integer i=0; i&lt;AccountList. Size();i++){…}

for (List L : AccountList) {…}

for(AccountList){…}

for (Account theAccount : AccountList){…}

Correct answer

for (Integer i=0; i&lt;AccountList. Size();i++){…}

for (Account theAccount : AccountList){…}

Feedback

Wrong Answer`

40. A developer has the controller class below:Public with sharing class 2/2
myFooController {Public integer prop { get; private set;}}Which code block
will run successfully in an execute anonymous window?

myFooController m = new myFooControler ();\ System.asseert(m.prop==null);

myFooController m = new myFooControler ();\ System.asseert(m.prop==1);

myFooController m = new myFooControler ();\ System.asseert(m.prop==0);

myFooController m = new myFooControler ();\ System.asseert(m.prop=!null);

Feedback

You're an expert!
41. A visualforce interface is created for Case Management that includes 2/2
both standard and custom functionality defined in an Apex class called
myControllerExtension. The visualforce page shouldinclude which
&lt;apex:page&gt; attribute(s) to correctly implement controller
functionality?

standardController = “case” and extensions =” myControllerExtension”

extensions=”myControllerExtension”

controller=”myControllerExtension”

controller = “case” and extensions =”myControllerExtension”

Feedback

You're an expert!

42. When are code coverage calculations updated? 2/2

When unit tests are run on an organization.

When Apex code is saved.

When changes are made to an organization’s configuration.

When a deployment is validated.

Feedback

You're an expert!
43. What is the printed from the following code? Integer a = 0; Integer b; a = 0/2
a++; a++; Integer c = a*5; String s = String.value(c) + a; System.debug(s + ‘;’
+ a +’;’ + b);

51;1;0

51;1;null

6;1; null

6;1;0

Correct answer

51;1;null

Feedback

Wrong Answer`
44. A developer created a Visualforce page with a custom controller to 0/2
show a list of accounts. The page uses the &lt;apex:SelectList&gt;
component, with a variable called “selection”, to show the valid values for
Account.Type. The page uses an &lt;apex:pageBlockTable&gt; component
to display the list of accounts, where the iteration variable is “acct”. The
developer wants to ensure that when a user selects a type on the
&lt;apex:selectList&gt; component, only accounts with that type are shown
on the page. What should the developer do to accomplish this? (Choose 2
answer)

Add the Rendered = (!Acct.type==selection) attribute to the pageBlockTable


component.

Create multiple lists in the controller that represent the relevant accounts for each
account type when the page loads, then reference the correct one dynamically on
the pageBlockTable.

Create a component for each option and use a variable with hide parameter on the
element.

Use the onChange event to update the list of accounts in the controller when the
value changes, and then re-render the pageBlockTable.

Correct answer

Add the Rendered = (!Acct.type==selection) attribute to the pageBlockTable


component.

Use the onChange event to update the list of accounts in the controller when the
value changes, and then re-render the pageBlockTable.

Feedback

Wrong Answer`
45. A developer uses a before insert trigger on the lead object to fetch the 2/2
Territory__c object, where the Territory__c.PostalCode__c matches the
Lead.PostalCode. The code fails when the developer uses the Apex data
loader to insert 10000 lead records. The developer has the following code
bloack: 01 for(Lead l: Trigger.new){ 02 If (l.PostalCode != null){ 03
List<Territory__c> terrlist = [Select Id from Territory__c where
PostalCode__c = :l.PostakCode]; 04 if(terrList.size() > 0){ 05 l.Territory__c =
terrList[0].Id; } } } Which line of code is causing the block to fail?

03: A SOQL query is located inside the for loop.

01: Trigger.new is not valid in a before insert Trigger.

02: A NullPointer exception is thrown if PostalCode is null.

05: The Lead in a before insert trigger cannot be updated.

Feedback

You're an expert!
46. A developer in Salesforce org with 100 Accounts executes the 0/2
following code using the Developer console:Account myAccount = new
Account(Name=’MyAccount’);Insert myAccount;For(Integer x=0;
x<150;x++){ Account newAccount = new
Account(Name=’MyAccount’+x); try{ insert
newAccount;}catch(Exception ex){System.debug(ex);}}Insert new
Account(Name=’MyAccount’);How many accounts are in the org after this
code is run?

101

100

252

102

Correct answer

100

Feedback

Wrong Answer`
47. A developer has the following trigger that fires after insert and creates 0/2
a child case whenever a new Case is created.List<Case> childCases = new
List<Case>();For(Case parent: Trigger.new){ Case child = new
Case(Parentd = parent.Id, Subject = parent.Subject);
childCases.add(child);}insert childCases;What happens after the code
block executes?

Multiple child cases are created for each parent case in Trigger.new

A child case is created for each parent case in Trigger.new

The trigger enters an infinite loop and eventually fails.

The trigger fails if the subject field on the parent is blank.

Correct answer

The trigger enters an infinite loop and eventually fails.

Feedback

Wrong Answer`
48. A developer creates a custom controller and custom Visualforce page 0/2
by using the following code block:public class myController {public String
myString;public String getMyString() {return 'getmyString';}public String
getStringMethod1() {return myString;}public String getStringMethod2() {if
(myString == null)myString = 'Method2';return myString;}}{!myString},
{!StringMethod1}, {!StringMethod2}, {!myString}.What does the user see
when accessing the custom page?

getMyString, , ,

, , Method2,

, , Method2, getMyString

getMyString , , Method2, getMyString

Correct answer

getMyString , , Method2, getMyString

Feedback

Wrong Answer`
49. Given the code block: Integer x; for (x = 0; x&lt;10; x+=2) { if (x==8) 0/2
break; if (x==10) break; } System.debug(x); Which value will the
system.debug statement display?

10

Correct answer

Feedback

Wrong Answer`
50. What is the capability of Force.com IDE? (Choose 2 answers) 0/2

Roll Back deployments.

Run Apex tests

Download debug logs.

Edit metadata components.

Correct answer

Run Apex tests

Edit metadata components.

Feedback

Wrong Answer`

51. What is an accurate constructor for a custom controller named 2/2


“MyController”?

public MyController(){account = new Account();}

public MyController(SObject obj){account = (Account) obj;}

public MyController(List<SObject> objects){accounts = (List<Account>)objects;}

public MyController(ApexPages.StandardController stdController){account =


(Account) stdController.getRecord();}

Feedback

You're an expert!
52. Which statement about the lookup relationship between a Custom 2/2
Object and a Standard Object is correct?

The Lookup Relationship on the Custom Object can prevent the deletion of the
standard object.

The lookup relationship cannot be marked as required on the page layout for the
custom object.

The custom object will be deleted when the referenced standard object is deleted.

The custom object inherits security from the referenced Standard object.

Feedback

You're an expert!

53. A developer has a single custom controller class that works with a 2/2
Visualforce Wizard to support creating and editing multiple sObjects. The
wizard accepts data from user inputs across multiple Visualforce pages
and from a parameter on the initial URL. Which statement is unnecessary
inside the unit test for the custom controller?

Public ExtendedController(ApexPages.StandardController cntrl) { }

ApexPages.currentPage().getParameters().put('input', 'TestValue')

Test.setCurrentPage(pageRef),

String nextPage = controller.save().getUrl();


54. Cloud Kicks Fitness, an ISV Salesforce partner, is developing a 2/2
managed package application. One of the application modules allows the
user to calculate body fat using the Apex class, BodyFat, and its method,
calculateBodyFat(). The product owner wants to ensure this method is
accessible by the consumer of the application when developing
customizations outside the ISV’s package namespace.

Declare the class and method using the global access modifier.

Declare the class as public and use the global access modifier on the method.

Declare the class as global and use the public access modifier on the method

Declare the class and method using the public access modifier.

55. A developer has an integer variable called maxAttempts. The developer 0/2
needs to ensure that once maxAttempts is initialized, it preserves its value
for the length of the Apex transaction; while being able to share the
variable’s state between trigger executions. How should the developer
declare maxAttempts to meet these requirements?

Declare maxAttempts as a member variable on the trigger definition.

Declare maxAttempts as a private static variable on a helper class.

Declare maxAttempts as a constant using the static and final keywords.

Declare maxAttempts as a variable on a helper class.

Correct answer

Declare maxAttempts as a constant using the static and final keywords.


56. A developer observes that an Apex test method fails in the Sandbox. To 0/2
identify the issue, the developer copies the code inside the test method
and executes it via the Execute Anonymous tool in the Developer Console.
The code then executes with no exceptions or errors. Why did the test
method fail in the sandbox and pass in the Developer Console?

The test method has a syntax error in the code.

The test method relies on existing data in the sandbox.

The test method is calling an @future method.

The test method does not use System.runaAs to execute as a specific user.

Correct answer

The test method relies on existing data in the sandbox.

57. A developer has an apex controller for a Visualforce page that takes an 0/2
ID as URl parameter.How should the developer prevent a cross site
scripting vulnerability?

Apexpages.current pages() .getParameter().get(‘url_param’)

Apexpages.current pages() .getParameter().get(‘url_param’).escapeHtml4()

string.valueofstringapexpages.currentpage().getparameters().get(‘url_param’))

string.escapesinglequotes(apexpages.currentpage().getparameters().get(‘url_para
m’))

Correct answer

Apexpages.current pages() .getParameter().get(‘url_param’).escapeHtml4()


58. A custom picklist field, Food_Preference__c, exists on a custom object. 0/2
The picklist contains the following options: ‘Vegan’, ‘Kosher’, ‘No
Preference’. The developer must ensure a value is populated every time a
record is created or updated.What is the most efficient way to ensure a
value is selected every time a record is saved?

Set “Use the first value in the list as the default value” as True.

Set a validation rule to enforce a value is selected.

Mark the field as Required on the field definition.

Mark the field as Required on the object’s page layout.

Correct answer

Mark the field as Required on the field definition.

59. A developer must provide a custom user interface when users edit a 2/2
Contact. Users must be able to use the interface in Salesforce Classic and
Lightning Experience. What should the developer do to provide the custom
user interface?

Override the Contact’s Edit button with a Visualforce page in Salesforce Classic
and a Lightning component in Lightning Experience.

Override the Contact’s Edit button with a Visualforce page in Salesforce Classic and
a Lightning page in Lightning Experience.

Override the Contact’s Edit button with a Lightning component in Salesforce Classic
and a Lightning component in Lightning Experience.

Override the Contact’s Edit button with a Lightning page in Salesforce Classic and a
Visualforce page in Lightning Experience.
60. A developer is debugging the following code to determine why 0/2
Accounts are not being created.Account a = new
Account(Name='A');Database.insert(a, false);How should the code be
altered to help debug the issue?

Add a System.debug() statement before the insert method.

Add a try/catch around the insert method.

Set the second insert method parameter to true.

Collect the insert method return value in a SaveResult record.

Correct answer

Collect the insert method return value in a SaveResult record.

This form was created inside Cyntexa. Report Abuse

Forms

You might also like