Platform Developer - I
Platform Developer-I
Start
Congratulations - you have completed Platform Developer - I.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
What is a correct pattern to follow when programming in Apex on a multi-tenant platform?
A | Apex code is created in a separate environment from schema to reduce deployment errors. |
B | DML is performed on one record at a time to avoid possible data concurrency issues. |
C | Queries select the fewest fields and records possible to avoid exceeding governor limits. |
D | Apex classes use the "with sharing keyword to prevent access from other server tenants”. |
Question 2 |
A developer created an Apex trigger using the Developer Console and now wants to debug code. How can the developer accomplish this in the Developer Console?
A | Open the Logs tab in the Developer Console. |
B | Select the Override Log Triggers checkbox for the trigger. |
C | Add the user name in the Log Inspector. |
D | Open the Progress tab in the Developer Console |
Question 3 |
An sObject named Application _c has a lookup relationship to another sObject named Position_c. Both Application _c and Position c have a picklist field named Status_c. When the Status c field on Position __c is updated, the Status_c field on Application _c needs to be populated automatically with the same value, and execute a workflow rule on Application c. Flow can a developer accomplish this?
A | By changing Application c.Status_c into a roll-up summary field. |
B | By changing Application c.Status_c into a formula field. |
C | By using an Apex trigger with a DML operation. |
D | By configuring a cross-object field update with a workflow. |
Question 4 |
Which data structure is returned to a developer when performing a SOSL search?
A | A list of lists of sObjects. |
B | A map of sObject typesto a list of sObjects. |
C | A map of sObject types to a list of lists of sObjects. |
D | A list of sObjects. |
Question 5 |
Which resource can be included in a Lightning Component bundle? Choose 2 answers
A | Apex class |
B | Adobe Flash |
C | JavaScript |
D | Documentation |
Question 6 |
Which type of code represents the Controller in MVC architecture on the FaCe.00111 platform? Choose 2 answers
A | JavaScript that is used to make a menu item display itself. |
B | StandardController system methods that are referenced by Visualforce. |
C | Custom Apex and JavaScript code that is used to manipulate data. |
D | A static resource that contains CSS and images. |
Question 7 |
A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce. Which kind of relationship would a developer use to relate the Account to the Warehouse?
A | One-to- Many |
B | Lookup |
C | Master-Detail |
D | Parent-Child |
Question 8 |
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 answers
A | Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues(). |
B | Use Schema.RecordTypelnfo returned by Case.SObjectType getDescribe().getRecordTypelnfos() |
C | Use SOQL to query Case records in the org to get all the RecordType values available for Case. |
D | Use SOQL to query Case records In the org to get all value for the Status pickiest field. |
Question 9 |
What is a valid Apex statement?
A | Map conMap = [SELECT Name FROM Contact]; |
B | Accountil acctlist = new List<Account>{new AccountO}; |
C | Integer w, x, y = 123, z = 'abc'; |
D | private static constant Double rate = 7.75; |
Question 10 |
A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per jobposting. 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?
A | Create a lookup relationship on both objects to a junction object called Job Posting Applications. |
B | Create a master-detail relationship in the Job Postings custom object to the Applications custom object. |
C | Create a master-detail relationship in the Application custom object to the Job Postings custom object. |
D | Create a lookup relationship in the Applications custom object to the Job Postings custom object. |
Question 11 |
What is a valid source and destination pair that can send or receive change sets? Choose 2 answers
A | Sandbox to production. |
B | Developer edition to sandbox. |
C | Developer edition to production. |
D | Sandbox to sandbox. |
Question 12 |
Which code segment can be used to control when the dowork() method is called?
A | For (triggerIsRunning t : trigger•new) {dowork();} |
B | If (trigger.IsRunning) { dowork(); } |
C | for (trigger.IsInsert t : trigger.new) { dowork(); } |
D | if (trigger.IsInsert) { dowork();} |
Question 13 |
In which order does Salesforce execute events upon saving a record?
A | Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit |
B | Validation Rules; Before Triggers; After Triggers; Workflow Rules; Assignment Rules; Commit |
C | Before Triggers; Validation Rules; Ater Triggers; Workflow Rules; Assignment Rules; Commit |
D | Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules;Commit |
Question 14 |
How can a developer avoid exceeding governor limits when using an Apex Trigger? choose 2 answers
A | By using a helper class that can be invoked from multiple triggers. |
B | By using the Database class to handle DML transactions. |
C | By using Maps to hold data from query results. |
D | By performing DML transactions on lists of SC. |
Question 15 |
The Review_c object has a lookup relationship up to the Job_Application_c object. The job_Application_c object has a master-detail relationship up to the Position_ object. The relationship field names are based on the auto-populated defaults What is the recommended way to display field data from the related Review_c records on a Visualforce for a single Position_c record?
A | Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data. |
B | Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _C data. |
C | Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review c data through the Job_Application_c object. |
D | Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data. |
Question 16 |
A developer needs to automatically populate the ReportsTo field in a Contact record based on the values of the 60- related Account and Department fields in the Contact record. Which type of trigger would the developer create? Choose 2 answers
A | before update |
B | after insert |
C | before Insert |
D | after update |
Question 17 |
A developer has the following trigger that fires after insert and creates a child Case whenever a new Case is created.
List<Case> childCases = new List<Case>f); for { ( Case parent : Trigger.new )
Case child = new Case(ParentId = parent.Id, Subject = parent.Subject); childCases.add( child ); }
insert childCases; what happens after the code block executes?
A | Multiple child cases are created for each parent case in Trigger.new. |
B | Child case is created for each parent case in Trigger.new. |
C | The trigger enters an infinite loop and eventually fails. |
D | The trigger fails if the Subject field on the parent is blank. |
Question 18 |
When creating unit tests In Apex, which statement is accurate?
A | Unit tests with multiple methods result in all methods fading every time one method fails. |
B | Increased test coverage requires large test classes with many lines of code in one method. |
C | Triggers do not require any unit tests in order to deploy them from sandbox to production. |
D | System Assert statements that do not Increase code coverage contribute important feedback In unit tests. |
Question 19 |
What is a capability of cross-object formula fields? Choose 3 answers
A | Formula fields can reference fields from master-detail or lookup parent relationships. |
B | Formula fields can expose data the user does not have access to in a record. |
C | Formula fields can be used in three roll-up summaries per object. |
D | Formula fields can reference fields in a collection of records from a child relationship. |
E | Formula fields can reference fields from objects that are up to 10 relationships away. |
Question 20 |
A developer created an Apex trigger- using the Developer Console and now wants to debug code How can the developer accomplish this in the Developer Console?
A | Select the Override Log Triggers checkboX for the trigger. |
B | Add the user name in the Log Inspector. |
C | Open the Progress tab in the Developer Console. |
D | Open the Logs tab in the Developer Console. |
Question 21 |
How can a developer refer to, or instantiate, a PageReference in Apex? Choose 2 answers
A | By using a PageReference with a partial or full URL. |
B | By using the Page object and a Visualforce page name. |
C | By using the ApexPages.Page() method with a Visualforce page name. |
D | By using the PageReference.Page() method with a partial or full URL. |
Question 22 |
When the number of records in a recordset is unknown, which control 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?
A | U For (init_stmt; exit condition; increment stmt} { |
B | - Do { While (Condition) |
C | For (variable : list_or_set) |
D | While (Condition) { ...} |
Question 23 |
What should a developer working in a sandbox use to exercise a new test class before the developer deploys that test class to production? Choose 2 answers
A | The REST API and ApexTestRun method. |
B | The Apex Test Execution page in Salesforce Setup. |
C | The Test menu in the Developer Console. |
D | The Run Tests page in Salesforce Setup. |
Question 24 |
What is a capability of the Force.COM IDE? Choose 2 answers
A | Roll back deployments. |
B | Run Apex tests. |
C | Download debug logs. |
D | Edit metadata components. |
Question 25 |
public String getStringMethodl() return myString;
public String getStringMethod2() ( if (myString == null) myString = 'Method2*; return myString;
}
<apex•page controller="myController "> {'myString}, OStringMethod1), OStringMethod2),
(!myString) </apex:page>
What does the user see when accessing the custom page?
A | getMyString,,, |
B | ,, Method2, |
C | „ Method2, getMyString |
D | getMyString„ Method2, getMyString |
Question 26 |
A developer creates a new Visualforce page and Apex extension, and writes test classes that exercise 95% coverage of the new Apex extension. Change set deployment to production fails with the test coverage warning: "Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverageis required." What can the developer do to successfully deploy the new Visualforce page and extension?
A | Create test classes to exercise the Visualforce page markup. |
B | Select "Disable Parallel Apex Testing" to run all the tests. |
C | Add test methods to existing test classes from previous deployments. |
D | Select "Fast Deployment" to bypass running all the tests. |
Question 27 |
A developer has a single custom controller class that works with a 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?
A | public ExtendedController(ApexPages.StandardController cntri) { } |
B | ApexPages.currentPage().getParameters() put('input', 'TestValue); |
C | Test.setCurrentPage(pageRef); |
D | String nextPage = controller.save().getUrl(); |
Question 28 |
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?
A | By using ApexMessage.Message() to display an error message after the number of DML statements is excel |
B | By using Messaging.SendEmail() to conthtinue the transaction and send an alert to the user after the number DML statements is exceeded. |
C | By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number DML statements is exceeded. |
D | By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded. |
Question 29 |
On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID parameter that is passed on the URL?
A | Use the constructor method for the controller. |
B | Use the $Action.View method in the Visualforce page. |
C | Create a new PageReference object with the Id. |
D | Use the <apex:detail> tag in the Visualforce page. |
Question 30 |
A developer has the following code block:
public class PaymentTax { public static decimal SalesTax = 0.0875; ..•
trigger OpportunityLineItemTrigger on OpportunityLineltem (before insert, before update) {
PaymentTax PayTax = new PaymentTax(); decimal ProductTax = ProductCost * XXXXXXXXXXX;
}
To calculate the ProductTax, which code segment would a developer insert at the XXXXXXXXXXX
to make the value the class variable SalesTax accessible within the trigger?
A | SalesTax |
B | PayTax.SalesTax |
C | PaymentTax.SalesTax |
D | OpportunityLineitemTrigger.SalesTax |
Question 31 |
What must the Controller for a visualforce page utilize to override the standard Opportunity view button?
A | The StandardSetController to support related lists for pagination. |
B | The Opportunity StandardController for pre-built functionality. |
C | A call back constructor to reference the StandardController. |
D | A constructor that initializes a private Opportunity variable. |
Question 32 |
A developer writes a before insert trigger. How can the developer access the incoming records in the trigger body?
A | By accessing the Trigger.new context variable. |
B | By accessing the Trigger.newRecords context variable. |
C | By accessing the Trigger.newMap context variable. |
D | By accessing the Tripper.newList context variable. |
Question 33 |
What is a characteristic of the Lightning Component framework? Choose 2 answers
A | It has an event-driven architecture. |
B | It works with existing Visualforce pages. |
C | It includes responsive components. |
D | It uses XML as its data format. |
Question 34 |
What is the preferred way to reference web content-- such as images, stylesheets, JavaScript, and other libraries that is used in Visualforce pages?
A | By accessing the content from Chatter Files. |
B | By uploading the content in the Documents tab. |
C | By accessing the content from a third-party CDN. |
D | By uploading the content as a Static Resource |
Question 35 |
In the code below, what type does Boolean in Boolean b = true;
A | Enum |
B | Object |
C | String |
D | class |
Question 36 |
A developer in a Salesforce org with 100 Accounts executes the following code using the Developer Console: Time Remaining: 52:41 Account r.yAccount = new Account (Name= '14yAccount 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?
A | 101 |
B | 100 |
C | 102 |
D | 252 |
Question 37 |
A custom exception named “RecordNotFoundException” is defined by the following code block
Public class RecordNotFoundException extends Exception {}
Which statement a developer can use to throw the custom exception? Choose 2 answers
A | Throw new RecordNotFoundException(‘Problem Occured’); |
B | Throw new RecordNotFoundException; |
C | Throw new RecordNotFoundException(‘Problem Occured’); |
D | Throw RecordNotFoundException; |
Question 38 |
Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers
A | Create activities at multiple intervals. |
B | Send an outbound message without Apex code. |
C | Copy an account address to its contacts. |
D | Submit a contract for approval. |
Question 39 |
What is the result when a Visualforce page calls an Apex controller, which calls another Apex class, which then results in hitting a governor limit?
A | Any changes up to the error are saved. |
B | Any changes up to the error are rolled back. |
C | All changes before a savepoint are saved. |
D | All changes are saved in the first Apex class. |
Question 40 |
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?
A | Create a junction object to relate many engines to many parts through a master-detail relationship. |
B | Create a master-detail relationship to represent the one-to- many model of engines to parts |
C | Create a lookup relationship to represent how each part relates to the parent engine object. |
D | Create a junction object to relate many engines to many parts through a lookup relationship. |
Question 41 |
What is true of a partial sandbox that is riot true of a full sandbox? Choose 2 answers
A | More frequent refreshes. |
B | Only includes necessary metadata. |
C | Use of change sets. |
D | Limited to 5 GB of data. |
Question 42 |
Which standard field needs to be populated when a developer inserts new Contact records programmatically?
A | Accountld |
B | Name |
C | LastName |
D | FirstName |
Question 43 |
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 answers
A | Download a Managed Package from the AppExchange that provides a custom Visualforce page to modify. |
B | Create a new Visualforce page and an Apex controller to provide Product data entry. |
C | Copy the standard page and then make a new Visualforce page for Product data entry. |
D | Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify. |
Question 44 |
What is the minimum log level needed to see user-generated debug statements?
A | DEBUG |
B | FINE |
C | INFO |
D | WARN |
Question 45 |
In an organization that has enabled multiple currencies, a developer needs to aggregate the sum of the Estimated_Value_c currency field from the Campaign Member object using a roll-up summary field called Total_Esumated_value_c on Campaign.
How is the currency of the Total_Estimated_Value_c roll-up summary field determined?
A | The values in CampaignMember.Estimated_Value_c are converted into the currency of the Campaign record, and the sum Is displayed using the currency on the Campaign record. |
B | The values In CampaignMember.Estimated_Value_c are converted into the currency on the majority of the Campaign Member records and the sum Is displayed using that currency. |
C | The values In CampaignMember.EstImated_Value_c are summed up and the resulting Total_Estimated_Value c field is displayed as a numeric field on the Campaign record. |
D | The values In CampaignMember.Estimated_Value_c are converted into the currency of the current user, and the sum is displayed using the currency on the Campaign record. |
Question 46 |
An org has different Apex Classes that provide Account related 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 V3lidation rules?
Choose 2 answers
A | Create a method that creates valid Account records, and call this method from within test methods. |
B | Create a method that loads valid Account records from a Static Resource, and call this method within test methods. |
C | Create a method that performs a callout for a valid Account record, and call this method from within test D. 0 |
D | Create a method that queries for valid Account records, and call this method from within test methods. |
Question 47 |
Which component is available to deploy using Metadata API? Choose 2 answers
A | Case Layout |
B | Account Layout |
C | Case Feed Layout |
D | Console Layout |
Question 48 |
What is a valid statement about Apex classes and interfaces? Choose 2 answers
A | The default modifier for a class is private. |
B | Exception classes must end with the word exception. |
C | A class can have multiple levels of inner classes. |
D | The default modifier for an interface is private. |
Question 49 |
A developer creates a workflow rule declaratively that updates a field on an object. An apex update trigger exists for the object.
What happens when a user updates a record?
A | No changes are made to the data. |
B | Both the Apex Trigger and Workflow Rule are fired only once. |
C | The Workflow Rule is fired more than once. |
D | The Apex Trigger is fired more than once. |
Question 50 |
A company that uses a custom object to track candidates hired would like to send candidate information automatically to a third-party human resources system when a candidate is what can a developer do to accomplish this task?
A | Create an escalation rule to the hiring manager. |
B | Create an auto response rule to the candidate. |
C | Create a Process Builder with an outbound message action. |
D | Create a workflow rule with an outbound message action. |
Question 51 |
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?
A | Before Trigger execution |
B | After Committing to database. |
C | Before committing to database. |
D | After Trigger execution. |
Question 52 |
To which primitive data type In Apex Is a currency field automatically assigned?
A | Integer |
B | Decimal |
C | Double |
D | Currency |
Question 53 |
A developer has a block of code that omits any 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?
A | Apex Triggers |
B | HTTP Callouts |
C | Apex Controllers |
D | Anonymous Blocks |
Question 54 |
When would a developer use a custom controller instead of a controller extension? Choose 2 answers
A | When a Visualforce page needs to replace the functionality of a standard controller. |
B | When a Visualforce page does not reference a single primary object. |
C | When a Visualforce page should not enforce permissions or field-level security. |
D | When a Visualforce page needs to add new actions to a standard controller. |
Question 55 |
When loading data into an organization, what can a developer do to match records to update existing records? Choose 2 answers
A | Match an external Id Text field to a column in the imported file. |
B | Match the Id field to a column in the imported file. |
C | Match the Name field to a column in the imported file. |
D | Match an auto-generated Number field to a column in the imported file. |
Question 56 |
What would a developer do to update a picklist field on related Opportunity records when a modification to the associated Account record is detected?
A | Create a process with Process Builder. |
B | Create a workflow rule with a field update. |
C | Create a Lightning Component. |
D | Create a Visualforce page. |
Question 57 |
A developer uses a before insert trigger on the Lead object to fetch the Territory_c object,
where the Territory_c.Posta1Code_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 block:
for {(Lead 1 : Trigper.new) {
if (1.PostalCode !- null) {
List<Territory c> terrList (SELECT Id FROM Territory c WHERE PostalCode_c =1. PostalCode];
if (terrList.size () > 0) {
1.Territory_c = terrList (0) .Id;
}
}
}
Which line of code is causing the code block to fail?A | 03: A SOQL query is located inside of the for loop code. |
B | 01: Trigger.new is not valid in a before insert Trigger. |
C | 02: A NullPointer exception is thrown if PostalCode is null. |
D | O5: The Lead in a before insert trigger cannot be updated. |
Question 58 |
What is accurate statement about with sharing key word?
A | Inner classes do not inherit the sharing setting from the container class |
B | Both inner and outer classes can be declared as with sharing |
C | Either inner or outer classes can be as with sharing, not both. |
D | Inner classes inherit the sharing setting from the container class. |
Question 59 |
Why would a developer use %Test.startTest() and Test.stopTest ()?
A | To avoid Apex code coverage requirements for the code between these lines |
B | To start and stop anonymous block execution when executing anonymous Apex code |
C | To indicate test code so that it does not impact Apex line count governor limits. |
D | To create an additional set of governor limits during the execution of a single test class. |
Question 60 |
A developer needs to create records for the object Property c. The developer creates the
following code block:
01 List<Property c> propertiesToCreate = helperClass.createProperties ;
02 try
03
04 ) catch (Exception exp) {
05 //Exception handling
06 }
Which line of code would the developer insert at line 03 to ensure that at least some records are
created, even if a f( records have errors and fail to be created?
A | 0 Database.insert(propertiesToCreate,System.ALLOW_PARTIAL); |
B | 0 insert propertiesToCreate; |
C | Database.insert(propertiesToCreate,false); |
D | ni Databaseinsert(propertiesToCreate); |
Question 61 |
A Developer wants to create a custom object to track Customer Invoices.
How Invoices and Accounts should be related to ensure that all Invoices are visible to everyone with access to an Account?
A | The Account should have a Lookup relationship to the Invoice. |
B | The Invoice should have a Master-Detail relationship to the Account. |
C | The Account should have a Master-Detail relationship to the Invoice. |
D | The Invoice should have a Lookup relationship to the Account. |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results
There are 61 questions to complete.
← |
List |
→ |
Return
Shaded items are complete.
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 |
31 | 32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 | 40 |
41 | 42 | 43 | 44 | 45 |
46 | 47 | 48 | 49 | 50 |
51 | 52 | 53 | 54 | 55 |
56 | 57 | 58 | 59 | 60 |
61 | End |
Return
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
Correct Answer
You Selected
Not Attempted
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Question Details
Results
Date
Score
Hint
Time allowed
minutes
seconds
Time used
Answer Choice(s) Selected
Question Text
All done
Need more practice!
Keep trying!
Not bad!
Good work!
Perfect!
Gopal Das
Founder at GopalDas.Org
He is a technology evangelist, Salesforce trainer, blogger, and working as a Salesforce Technical Lead. After working in Java based project implementation, he jumped to the Salesforce system on a whim and never looked back. He fell in love with Salesforce’s flexibility, scalability, and power. He expanded his knowledge of the platform and became a Certified App Builder, Administrator, Platform Developer I, SalesCloud Consultant while leading the Salesforce implementation and technology needs. He has worked in a wide variety of applications/services like desktop, web and mobile applications.
Latest posts by Gopal Das (see all)
- Salesforce Certified Platform Developer I – Winter ’18 Release Exam - November 23, 2017
- Salesforce Certified Platform App Builder – Winter ’18 Release Exam - November 22, 2017
- Salesforce Certified Administrator – Winter’ 18 Release Exam - November 21, 2017