Salesforce Platform Developer 1
Salesforce Platform Developer 1
2. Which trigger event allows a developer to update fields in the Trigger.new list without using an
additional DML statement?Choose 2 answers
3. Which statement would a developer use when creating test data for products and pricebooks?
5. Which type of information is provided by the Checkpoints tab in the Developer Console?
(Choose 2)
6. A developer wrote a workflow email alert on case creation so that an email is sent to the case
owner manager when a case is created. When will the email be sent?
7. Which code block returns the ListView of an Account object using the following debug
statement? system.debug(controller.getListViewOptions() );
8. The Sales Management team hires a new intern. The intern is not allowed to view
Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when
viewing an Account record. What would a developer do to meet this requirement?
Ans: Create a roll-up summary field on the Account object that performs a MAX on the Opportunity
Close Date field.
Ans: More pre-built components to replicate the salesforce look and feel
Ans:
public MyController () {
}
11. What is a valid source and destination pair that can send or receive change sets? (Choose 2)
Ans:
Sandbox to Production
Sandbox to Sandbox
12. How can a developer determine, from the DescribeSObjectResult, if the current user will be
able to create records for an object in Apex?
Ans: Governor limits prevent tenants from impacting performance in multiple orgs on the same
instance.
14. What is the value of x after the code segment executes?String x = 'A';Integer i = 10;if ( i < 15 ) {i =
15;x = 'B';} else if ( i < 20 ) {x = 'C';} else {x = 'D'; }
Ans: B
15. A developer has the following query: Contact c = [SELECT id, firstname, lastname, email FROM
Contact WHERE lastname = 'Smith']; What does the query return if there is no Contact with the
last name 'Smith'?
Ans: Execute Anonymous Apex code, Create/Edit code, view Debug Logs.
Ans:
18. Which resource can be included in a Lightning Component bundle? Choose 2 answers
Ans:
Javascript
Documentation
19. Where can the custom roll-up summary fields be created using Standard Object relationships
(Choose 3)
Ans:
21. A developer needs to create a Visualforce page that will override the standard Account edit
button. The page will be used to validate the account's address using a SOQL query. The page
will also allow the user to make edits to the address. Where would the developer write the
Account address verification logic?
22. In which order does Salesforce execute events upon saving a record?
Ans: Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit
23. A developer creates an Apex class that includes private methods. What can the developer do to
ensure that the private methods can be accessed by the test class?
Ans:
25. A developer needs to provide a Visualforce page that lets users enter Product-specific details
during a Sales cycle. How can this be accomplished? (Choose 2)
Ans:
Create a new Visualforce page and an Apex controller to provide Product data entry.
Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page
to modify.
26. A Visualforce page has a standard controller for an object that has a lookup relationship to a
parent object. How can a developer display data from the parent record on the page?
Ans: By using merge field syntax to retrieve data from the parent record.
Ans:
Generate a link using the HYPERLINK function to a specific record in a legacy system.
Ans: Create data for testing. Call the method being tested. Verify that the results are correct.
29. A developer needs to know if all tests currently pass in a Salesforce environment. Which feature
can the developer use? (Choose 2)
Ans:
Developer Console
30. When loading data into an operation, what can a developer do to match records to update
existing records? (Choose 2)
Ans:
31. A developer wants to create a custom object to track Customer Invoices.How should Invoices
and Accounts be related to ensure that all Invoices are visible to everyone with access to an
Account?
Ans:
32. Which user can edit a record after it has been locked for approval? (Choose 2)
Ans:
Admin
33. A developer in a Salesforce org with 100 Accounts executes the 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?
Ans: 100
34. A reviewer is required to enter a reason in the comments field only when a candidate is
recommended to be hired. Which action can a developer take to enforce this requirement?
35. A developer writes a SOQL query to find child records for a specific parent. How many levels can
be returned in a single query?
Ans: 5
36. When can a developer use a custom Visualforce page in a Force.com application? (Choose 2)
Ans:
37. A developer has a block of code that omits any statements that indicate whether the code block
should execute with or without sharing. What will automatically obey the organization-wide
defaults and sharing settings for the user who executes the code in the Salesforce organization?
38. A developer wants to display all of the available record types for a Case 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 Visualforce page. Which action can the developer perform to
get the record types and picklist values in the controller? (Choose 2)
Ans:
39. A developer creates a custom controller and custom Visualforce page 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?
Ans:
Ans:
Create a trigger on the Interview object that updates a field on the Candidate object.
Ans:
42. A developer wants to list all of the Tasks for each Account on the Account detail page. When a
task is created for a Contact, what does the developer need to do to display the Task on the
related Account record?
43. What is the minimum log level needed to see user-generated debug statements?
Ans: Debug
45. What is a good practice for a developer to follow when writing a trigger? (Choose 2)
Ans:
46. Which statement should a developer avoid using inside procedural loops? (Choose 2)
Ans:
List contacts = [SELECT Id, Salutation, FirstName, LastName, Email FROM Contact WHERE AccountId
= :a.Id];
Update contactList;
47. A developer creates an Apex helper class to handle complex trigger logic. How can the helper
class warn users when the trigger exceeds DML governor limits?
Ans:
By using Limits.getDMLRows() and then displaying an error message before the number of DML
statements is exceeded.
48. How can a developer avoid exceeding governor limits when using Apex Triggers? (Choose 2)
Ans:
49. A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce. Which statement
can a developer use to retrieve the correct URL for the current user'sprofile and display this on a
Visualforce Page?
Ans: {!$Setup.Url_Settings__C.URL__c}
50. What is a valid way of loading external JavaScript files into a Visualforce page? (Choose 2)
Ans:
Ans:
Ans:
Ans:
Database.insert(propertiesToCreate, false);
54. Which data type or collection of data types can SOQL statements populate or evaluate to?
(Choose 3)
Ans:
A single sObject
Integer
A List of listObject
55. 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?
Ans:
Create a junction object to relate many engines to many parts through a master-detail
relationship
56. Which declarative method helps ensure quality data? (Choose 3)
Ans:
Validation Rules
Lookup Filters
Page Layouts