100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Salesforce Platform Developer I Study Guide | 250 Questions and Answers (Complete Solutions)

Rating
-
Sold
-
Pages
57
Grade
A
Uploaded on
26-05-2025
Written in
2024/2025

Salesforce Platform Developer I Study Guide | 250 Questions and Answers (Complete Solutions) 1.) Which statement results in an Apex compiler error? A. Map<Id,Lead> lmap = new Map<Id,Lead>([Select ID from Lead Limit 8]); B. Date d1 = Date.Today(), d2 = Date.ValueOf(''); C. Integer a=5, b=6, c, d = 7; D. List<string> s = List<string>{'a','b','c');2.) What are two benefits of the Lightning Component framework? (Choose two.) A. It simplifies complexity when building pages, but not applications. B. It provides an event-driven architecture for better decoupling between components. C. It promotes faster development using out-of-box components that are suitable for desktop and mobile devices. D. It allows faster PDF generation with Lightning components.B. It provides an event-driven architecture for better decoupling between components.3.) A method is passed a list of generic sObjects as a parameter.What should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject? A. Use the first three characters of the sObject ID to determine the sObject type. B. Use the getSObjectType method on each generic sObject to retrieve the sObject token. C. Use the getSObjectName method on the sObject class to get the sObject name. D. Use a try-catch construct to cast the sObject into one of the three sObject types.4.) What should a developer use to implement an automatic Approval Process submission for Cases? A. An Assignment Rule B. Scheduled Apex C. Process Builder D. A Workflow Rule5.) When viewing a Quote, the sales representative wants to easily see how many discounted items are included in the Quote Line Items. What should a developer do to meet this requirement? A. Create a trigger on the Quote object that queries the Quantity field on discountedQuote Line Items. B. Create a Workflow Rule on the Quote Line Item object that updates a field on the parent Quote when the item is discounted. C. Create a roll-up summary field on the Quote object that performs a SUM on the quote Line Item Quantity field, filtered for only discounted Quote Line Items. D. Create a formula field on the Quote object that performs a SUM on the Quote Line Item Quantity field, filtered for only discounted Quote Line Items.6.) A Developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger. Which method allows access to the price book? A. Use TStandardPricebookId() to get the standard price book ID. B. Use @IsTest(SeeAllData=true) and delete the existing standard price book. C. Use TData() and a Static Resource to load a standard price book. D. Use @TestVisible to allow the test method to see the standard price book.7.) Which two Apex data types can be used to reference a Salesforce record ID dynamically? (Choose two.) A. ENUM B. sObject C. External ID D. String8.) Where can a developer identify the time taken by each process in a transaction using Developer Console log inspector? A. Performance Tree tab under Stack Tree panel B. Execution Tree tab under Stack Tree panel C. Timeline tab under Execution Overview panel D. Save Order tab under Execution Overview panel9.) Which two platform features align to the Controller portion of MVC architecture? (Choose two.) A. Process Builder actions B. Workflow rules C. Standard objects D. Date fields10.) A developer needs to test an Invoicing system integration. After reviewing the number of transactions required for the test, the developer estimates that the test data will total about 2 GB of data storage. Production data is not required for the integration testing. Which two environments meet the requirements for testing? (Choose two.)A. Developer Sandbox B. Full Sandbox C. Developer Edition D. Partial Sandbox E. Developer Pro Sandbox11.) A developer working on a time management application wants to make total hours for each timecard available to application users. A timecard entry has a Master-Detail relationship to a timecard. Which approach should the developer use to accomplish this declaratively? A. A Visualforce page that calculates the total number of hours for a timecard and displays it on the page B. A Roll-Up Summary field on the Timecard Object that calculates the total hours from timecard entries for that timecard C. A Process Builder process that updates a field on the timecard when a timecard entry is created D. An Apex trigger that uses an Aggregate Query to calculate the hours for a given timecard and stores it in a custom field12.) A developer encounters APEX heap limit errors in a trigger. Which two methods should the developer use to avoid this error? (Choose two.) A. Use the transient keyword when declaring variables. B. Query and store fields from the related object in a collection when updating related objects. C. Remove or set collections to null after use. D. Use SOQL for loops instead of assigning large queries results to a single collection and looping through the collection.13.) Which approach should be used to provide test data for a test class? A. Query for existing records in the database. B. Execute anonymous code blocks that create data. C. Use a test data factory class to create test data. D. Access data in @TestVisible class variables.14.) Which approach should a developer take to automatically add a `Maintenance Plan` to each Opportunity that includes an `Annual Subscription` when an opportunity is closed? A. Build a OpportunityLineItem trigger that adds a PriceBookEntry record. B. Build an OpportunityLineItem trigger to add an OpportunityLineItem record. C. Build an Opportunity trigger that adds a PriceBookEntry record. D. Build an Opportunity trigger that adds an OpportunityLineItem record.15.) Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.) A. The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used. B. Test data is inserted once for all test methods in a class. C. Records created in the @testSetup method cannot be updates in individual test methods. D. The @testSetup method is automatically executed before each test method in the test class is executed.16.) What is the requirement for a class to be used as a custom Visualforce controller? A. Any top-level Apex class that has a constructor that returns a PageReference B. Any top-level Apex class that extends a PageReference C. Any top-level Apex class that has a default, no-argument constructor D. Any top-level Apex class that implements the controller interface17.) A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension.The Visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality? A. controller='Case' and extensions='myControllerExtension' B. extensions='myControllerExtension' C. controller='myControllerExtension D. standardController='Case' and extensions='myControllerExtension'18.) A newly hired developer discovers that there are multiple triggers on the case object. What should the developer consider when working with triggers? A. Developers must dictate the order of trigger execution. B. Trigger execution order is based on creation date and time. C. Unit tests must specify the trigger being tested. D. Trigger execution order is not guaranteed for the same sObject.19.) How should a developer prevent a recursive trigger? A. Use a 'one trigger per object' pattern. B. Use a static Boolean variable. C. Use a trigger handler. D. Use a private Boolean variable.20.) Which three options can be accomplished with formula fields? (Choose three.) A. Generate a link using the HYPERLINK function to a specific record.B. Display the previous value for a field using the PRIORVALUE function. C. Determine if a datetime field value has passed using the NOW function. D. Return and display a field value from another object using the VLOOKUP function. E. Determine which of three different images to display using the IF function.21.) What is a capability of the <ltng:require> tag that is used for loading external JavaScript libraries in Lightning Component? (Choose three.) A. Loading files from Documents. B. One-time loading for duplicate scripts. C. Specifying loading order. D. Loading scripts in parallel. E. Loading externally hosted scripts.22.) A Platform Developer needs to write an Apex method that will only perform an action if a record is assigned to a specific Record Type. Which two options allow the developer to dynamically determine the ID of the required Record Type by its name? (Choose two.) A. Make an outbound web services call to the SOAP API. B. Hardcode the ID as a constant in an Apex class. C. Use the getRecordTypeInfosByName() method in the DescribeSObjectResult class. D. Execute a SOQL query on the RecordType object.23.) A developer has the controller class below. Which code block will run successfully in an execute anonymous window? A. myFooController m = new myFooController(); St( !=null); B. myFooController m = new myFooController(); St( ==0); C. myFooController m = new myFooController(); St( ==null); D. myFooController m = new myFooController(); St( ==1);24.) In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex? A. As a List<String> with each value as an element in the list B. As a String with each value separated by a comma C. As a String with each value separated by a semicolon D. As a Set<String> with each value as an element in the set25.) A developer writes the following code: List<Account> acc = [SELECT Id FROM Account LIMIT 10]; Delete acc; DRecycleBin(acc); System.Debug(LDMLStatements() + ', ' + LLimitDMLStatements()); What is the result of the debug statement?A. 1, 100 B. 1, 150 C. 2, 150 D. 2, 20026.) What are two valid options for iterating through each Account in the collection List<Account> named AccountList? (Choose two.) A. for (Account theAccount : AccountList) {ג€¦} B. for(AccountList) {ג€¦} C. for (List L : AccountList) {ג€¦} D. for (Integer i=0; i < AccountList.Size(); i++) {ג€¦}27.) Given:Map<ID, Account> accountMap = new Map>ID, Account> ([SELECT Id, Name FROM Account]);What are three valid Apex loop structures for iterating through items in the collection? (Choose three.) A. for (ID accountID : accountMSet()) {ג€¦} B. for (Account accountRecord : accountMs()) {ג€¦} C. for (Integer i=0; I < accountM(); i++) {ג€¦} D. for (ID accountID : accountMap) {ג€¦} E. for (Account accountRecord : accountMSet()) {ג€¦}28.) Universal Containers wants Opportunities to be locked from editing when reaching the Closed/Won stage. Which two strategies should a developer use to accomplish this? (Choose two.) A. Use a Visual Workflow. B. Use a validation rule. C. Use the Process Automation Settings. D. Use a Trigger.29.) How should a developer make sure that a child record on a custom object, with a lookup to the Account object, has the same sharing access as its associated account? A. Create a Sharing Rule comparing the custom object owner to the account owner. B. Create a validation rule on the custom object comparing the record owners on both records. C. Include the sharing related list on the custom object page layout. D. Ensure that the relationship between the objects is Master-Detail.30.) An org has a single account named `˜NoContacts' that has no related contacts. Given the query:List<Account> accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name=`˜NoContacts'];What is the result of running this Apex?A. accounts[0].contacts is invalid Apex. B. accounts[0].contacts is an empty Apex. C. accounts[0].contacts is Null. D. A QueryException is thrown.31.) A platform developer at Universal Containers needs to create a custom button for the Account object that, when clicked, will perform a series of calculations and redirect the user to a custom Visualforce page.Which three attributes need to be defined with values in the <apex:page> tag to accomplish this? (Choose three.) A. action B. renderAs C. standardController D. readOnly E. extensions32.) Using the Schema Builder, a developer tries to change the API name of a field that is referenced in an Apex test class.What is the end result? A. The API name is not changed and there are no other impacts. B. The API name of the field and the reference in the test class is changed. C. The API name of the field is changed, and a warning is issued to update the class. D. The API name of the field and the reference in the test class is updated.33.) When is an Apex Trigger required instead of a Process Builder Process? A. When a record needs to be created B. When multiple records related to the triggering record need to be updated C. When a post to Chatter needs to be created D. When an action needs to be taken on a delete or undelete, or before a DML operation is executed.34.) A developer needs to join data received from an integration with an external system with parent records in Salesforce. The data set does not contain theSalesforce IDs of the parent records, but it does have a foreign key attribute that can be used to identify the parent. Which action will allow the developer to relate records in the data model without knowing the Salesforce ID? A. Create and populate a custom field on the parent object marked as Unique. B. Create a custom field on the child object of type External Relationship. C. Create and populate a custom field on the parent object marked as an External ID. D. Create a custom field on the child object of type Foreign Key.35.) A developer created a Lightning component to display a short text summary for an object and wants to use it with multiple Apex classes. How should the developer design the Apex classes?A. Have each class define method getObject() that returns the sObject that is controlled by the Apex class. B. Extend each class from the same base class that has a method getTextSummary() that returns the summary. C. Have each class implement an interface that defines method getTextSummary() that returns the summary. D. Have each class define method getTextSummary() that returns the summary.36.) Which approach should a developer use to add pagination to a Visualforce page? A. A StandardController B. The Action attribute for a page C. The extensions attribute for a page D. A StandardSetController37.) A developer is asked to create a PDF quote document formatted using the company's branding guidelines, and automatically save it to the Opportunity record. Which two ways should a developer create this functionality? (Choose two.) A. Install an application from the AppExchange to generate documents. B. Create a Visualforce page with custom styling. C. Create an email template and use it in Process Builder. D. Create a visual flow that implements the company's formatting.38.) Which tool allows a developer to send requests to the Salesforce REST APIs and view the responses? A. REST resource path URL B. Workbench REST Explorer C. Developer Console REST tab D. F IDE REST Explorer tab39.) A developer created a Visualforce page and a custom controller with methods to handle different buttons and events that can occur on the page. What should the developer do to deploy to production? A. Create a test class that provides coverage of the Visualforce page. B. Create a test page that provides coverage of the Visualforce page. C. Create a test page that provides coverage of the custom controller. D. Create a test class that provides coverage of the custom controller.What is a benefit of using an after insert trigger over using a before insert trigger? A. An after insert trigger allows a developer to bypass validation rules when updating fields on the new record. B. An after insert trigger allows a developer to insert other objects that reference thenew record. C. An after insert trigger allows a developer to make a callout to an external service. D. An after insert trigger allows a developer to modify fields in the new record without a query.41.) The operation manager at a construction company uses a custom object called Machinery to manage the usage and maintenance of its cranes and other machinery. The manager wants to be able to assign machinery to different constructions jobs, and track the dates and costs associated with each job. More than one piece of machinery can be assigned to one construction job. What should a developer do to meet these requirements? A. Create a lookup field on the Construction Job object to the Machinery object. B. Create a lookup field on the Machinery object to the Construction Job object. C. Create a junction object with Master-Detail Relationship to both the Machinery object and the Construction Job object. D. Create a Master-Detail Lookup on the Machinery object to the Construction Job object.Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? (Choose two.) A. Use collections to store all fields from a related object and not just minimally required fields. B. Use methods from the ג€Limitsג€ class to monitor governor limits. C. Use SOQL for loops to iterate data retrieved from queries that return a high number of rows. D. Use variables within Apex classes to store large amounts of data.B. Use methods from the ג€Limitsג€ class to monitor governor limits.43.) Which set of roll-up types are available when creating a roll-up summary field? A. COUNT, SUM, MIN, MAX B. AVERAGE, SUM, MIN, MAX C. SUM, MIN, MAX D. AVERAGE, COUNT, SUM, MIN, MAX44.) What is the result of the debug statements in testMethod3 when you create test data using testSetup in below code? A. Account0.Phone=333-8781, Account1.Phone=333-8780 B. Account0.Phone=888-1515, Account1.Phone=999-2525 C. Account0.Phone=333-8780, Account1.Phone=333-8781 D. Account0.Phone=888-1515, Account1.Phone=.) Which three options allow a developer to use custom styling in a Visualforce page? (Choose three.) A. <apex:stylesheet> tag B. Inline CSS C. <apex:style>tag D. <apex:stylesheets>tag E. A static resource46.) A developer executes the following query in Apex to retrieve a list of contacts for each account:List<account> accounts = [Select ID, Name, (Select ID, Name from Contacts) from Account] ;Which two exceptions may occur when it executes? (Choose two.) A. CPU limit exception due to the complexity of the query. B. SOQL query row limit exception due to the number of contacts. C. SOQL query limit exception due to the number of contacts. D. SOQL query row limit exception due to the number of accounts.47.) Which three tools can deploy metadata to production? (Choose three.) A. Change Set from Developer Org B. F IDE C. Data Loader D. Change Set from Sandbox E. Metadata API48.) A developer needs to display all of the available fields for an object.In which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object? (Choose two.) A. Use myObject.sObjectTDescribe().fieldSet() to return a set of fields. B. Use mySOOMap() to return a map of fields. C. Use SibeSObjects(new String[]{myObject})[0].Map() to return a map of fields. D. Use getGlobalDescribe().get(myObject).getDescribe().Map() to return a map of fields.49.) How should a developer avoid hitting the governor limits in test methods?A. Use @TestVisible on methods that create records. B. Use TData() to load data from a static resource. C. Use @IsTest (SeeAllData=true) to use existing data. D. Use TTest() to reset governor limits.50.) Which three declarative fields are correctly mapped to variable types in Apex? (Choose three.) A. Number maps to Decimal. B. Number maps to Integer. C. TextArea maps to List of type String. D. Date/Time maps to DateTime E. Checkbox maps to Boolean.51.) A developer is asked to set a picklist field to `˜Monitor' on any new Leads owned by a subnet of Users. How should the developer implement this request? A. Create an after insert Lead trigger. B. Create a before insert Lead trigger. C. Create a Lead Workflow Rule Field Update. D. Create a Lead formula field.52.) Why would a developer consider using a custom controller over a controller extension? A. To increase the SOQL query governor limits. B. To implement all of the logic for a page and bypass default Salesforce functionality C. To leverage built-in functionality of a standard controller D. To enforce user sharing settings and permissions53.) A developer wants to override a button using Visualforce on an object. What is the requirement? A. The controller or extension must have a PageReference method. B. The standardController attribute must be set to the object. C. The action attribute must be set to a controller method. D. The object record must be instantiated in a controller or extension.54.) A lead object has a custom field Prior_Email__c. The following trigger is intended to copy the current Email into the Prior_Email__c field any time the Email field is changed: Which type of exception will this trigger cause? A. A null reference exception B. A compile time exception C. A DML exception D. A limit exception when doing a bulk update55.) How should a developer create a new custom exception class? A. public class CustomException extends Exception{} B. CustomException ex = new (CustomException)Exception(); C. public class CustomException implements Exception{} D. (Exception)CustomException ex = new Exception();56.) Which two number expressions evaluate correctly? (Choose two. A. Double d = 3.14159; B. Integer I = 3.14159; C. Decimal d = 3.14159; D. Long l = 3.14159;57.) How can a developer set up a debug log on a specific user? A. It is not possible to setup debug logs for users other than yourself. B. Ask the user for access to their account credentials, log in as the user and debug the issue. C. Create Apex code that logs code actions into a custom object. D. Set up a trace flag for the user, and define a logging level and time period for the trace.58.) A developer needs to create a Visualforce page that displays Case data. The page will be used by both support reps and support managers. The Support Rep profile does not allow visibility of the Customer_Satisfaction__c field, but the Support Manager profile does. How can the developer create the page to enforce Field Level Security and keep future maintenance to a minimum? A. Create one Visualforce Page for use by both profiles. B. Use a new Support Manager permission set. C. Create a separate Visualforce Page for each profile. D. Use a custom controller that has the with sharing keywords.59.) When an Account's custom picklist field called Customer Sentiment is changed to a value of `Confused`, a new related Case should automatically be created. Which two methods should a developer use to create this case? (Choose two.) A. Process Builder B. Apex Trigger C. Custom Button D. Workflow Rule60.) What are three characteristics of static methods? (Choose three.) A. Initialized only when a class is loadedB. A static variable outside of the scope of an Apex transaction C. Allowed only in outer classes D. Allowed only in inner classes E. Excluded from the view state for a Visualforce page61.) What are two uses for External IDs? (Choose two.) A. To create relationships between records imported from an external system. B. To create a record in a development environment with the same Salesforce ID as in another environment C. To identify the sObject type in Salesforce D. To prevent an import from creating duplicate records using Upsert62.) A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown.Which step should the developer take to resolve the issue and properly test the exception? A. Use try/catch within the unit test to catch the exception. B. Use the finally bloc within the unit test to populate the exception. C. Use the database methods with all or none set to FALSE. D. Use TRunningTest() within the custom controller.63.) Which SOQL query successfully returns the Accounts grouped by name?A. SELECT Type, Max(CreatedDate) FROM Account GROUP BY Name B. SELECT Name, Max(CreatedDate) FROM Account GROUP BY Name C. SELECT Id, Type, Max(CreatedDate) FROM Account GROUP BY Name D. SELECT Type, Name, Max(CreatedDate) FROM Account GROUP BY Name LIMIT 564.) For which three items can a trace flag be configured? (Choose three.) A. Apex Trigger B. Apex Class C. Process Builder D. User E. Visualforce65.) A developer is asked to create a custom Visualforce page that will be used as a dashboard component. Which three are valid controller options for this page? (Choose three.) A. Use a standard controller. B. Use a standard controller with extensions. C. Use a custom controller with extensions. D. Do not specify a controller. E. Use a custom controller.66.) A Platform Developer needs to implement a declarative solution that will display the most recent Closed Won date for all Opportunity records associated with anAccount. Which field is required to achieve this declaratively? A. Roll-up summary field on the Opportunity object B. Cross-object formula field on the Opportunity object C. Roll-up summary field on the Account object D. Cross-object formula field on the Account object67.) Which three statements are true regarding the @isTest annotation? (Choose three.) A. A method annotated @isTest(SeeAllData=true) in a class annotated @isTest(SeeAllData=false) has access to all org data. B. A method annotated @isTest(SeeAllData=false) in a class annotated @isTest(SeeAllData=true) has access to all org data. C. A class containing test methods counts toward the Apex code limit regardless of any @isTest annotation. D. Products and Pricebooks are visible in a test even if a class is annotated @isTest(SeeAllData=false). E. Profiles are visible in a test even if a class is annotated @isTest(SeeAllData=false).68.) What is the data type returned by the following SOSL search?[FIND `˜Acme*' IN NAME FIELDS RETURNING Account, Opportunity]; A. List<List<Account>, List<Opportunity>> B. Map<sObject, sObject> C. List<List<sObject>> D. Map<Id, sObject>74.) Which option should a developer use to create 500 Accounts and make sure that duplicates are not created for existing Account Sites? A. Sandbox template B. Data Loader C. Data Import Wizard D. Salesforce-to-Salesforce69.) A company wants to create an employee rating program that allows employees to rate each other. An employee's average rating must be displayed on the employee record. Employees must be able to create rating records, but are not allowed to create employee records. Which two actions should a developer take to accomplish this task? (Choose two.) A. Create a trigger on the Rating object that updates a fields on the Employee object. B. Create a lookup relationship between the Rating and Employee object.C. Create a roll-up summary field on the Employee and use AVG to calculate the average rating score. D. Create a master-detail relationship between the Rating and Employee objects.70.) Which two SOSL searches will return records matching search criteria contained in any of the searchable text fields on an object? (Choose two.) A. [FIND 'Acme*' IN ANY FIELDS RETURNING Account, Opportunity]; B. [FIND 'Acme*' RETURNING Account, Opportunity]; C. [FIND 'Acme*' IN ALL FIELDS RETURNING Account, Opportunity]; D. [FIND 'Acme*' IN TEXT FIELDS RETURNING Account, Opportunity];75.) Which two components are available to deploy using the Metadata API? (Choose two.) A. Lead Conversion Settings B. Web-to-Case C. Web-to-Lead D. Case Settings71.) For which example task should a developer use a trigger rather than a workflow rule? A. To set the Name field of an expense report record to Expense and the Date when it is saved B. To send an email to a hiring manager when a candidate accepts a job offer C. To notify an external system that a record has been modified D. To set the primary Contact on an Account record when it is saved72.) Which feature should a developer use to update an inventory count on related Product records when the status of an Order is modified to indicate it is fulfilled? A. Process Builder process B. Lightning component C. Visualforce page D. Workflow rule73.) A developer has JavaScript code that needs to be called by controller functions in multiple Aura components by extending a new abstract component. Which resource in the abstract Aura component bundle allows the developer to achieve this? A. B. C. superR D. 76.) Which three statements are true regarding cross-object formulas? (Choose three.) A. Cross-object formulas can reference fields from objects that are up to 10 relationships away. B. Cross-object formulas can reference fields from master-detail or lookup relationships. C. Cross-object formulas can reference child fields to perform an average. D. Cross-object formulas can expose data the user does not have access to in a record. E. Cross-object formulas can be referenced in roll-up summary fields.77.) Which two statements are true about Apex code executed in Anonymous Blocks? (Choose two.) A. The code runs with the permissions of the user specified in the runAs() statement. B. The code runs with the permissions of the logged in user. C. The code runs in system mode having access to all objects and fields. D. All DML operations are automatically rolled back. E. Successful DML operations are automatically committed.78.) From which two locations can a developer determine the overall code coverage for a sandbox? (Choose two.) A. The Apex Test Execution page B. The Test Suite Run panel of the Developer Console C. The Apex classes setup page D. The Tests tab of the Developer Console79.) Which two practices should be used for processing records in a trigger? (Choose two.) A. Use a Map to reduce the number of SOQL calls. B. Use @future methods to handle DML operations. C. Use a Set to ensure unique values in a query filter. D. Use (callout=true) to update an external system.80.) Which two statements are acceptable for a developer to use inside procedural loops? (Choose two.) A. delete contactList; B. contactLe(i); C. Contact con = new Contact(); D. Account a = [SELECT Id, Name FROM Account WHERE Id = :con.AccountId LIMIT 1];81.) What is the debug output of the following Apex code? Decimal theValue; S(theValue);A. 0.0 B. null C. Undefined D. 082.) A developer needs to provide a way to mass edit, update, and delete records from a list view. In which two ways can this be accomplished? (Choose two.) A. Create a new Visualforce page and Apex Controller for the list view that provides mass edit, update, and delete functionality. B. Download a managed package from the AppExchange that provides customizable Enhanced List Views and buttons. C. Download an unmanaged package from the AppExchange that provides customizable mass edit, update, and delete functionality. D. Configure the user interface and enable both inline editing and enhanced lists.83.) Which type of code represents the Model in the MVC architecture when using Apex and Visualforce pages? A. A Controller Extension method that saves a list of Account records B. Custom JavaScript that processes a list of Account records C. A list of Account records returned from a Controller Extension method D. A Controller Extension method that uses SOQL to query for a list of Account records84.) Requirements state that a child record is deleted when its parent is deleted, and a child can be moved to a different parent when necessary. Which type of relationship should be built between the parent and child objects in Schema builder to support these requirements? A. Master-Detail relationship B. Child relationship C. Lookup relationship from the parent to the child D. Lookup relationship from the child to the parent85.) Which tag should a developer include when styling from external CSS is required in a Visualforce page? A. apex:includeStyles B. apex:includeScript C. apex:require D. apex:stylesheet86.) Managed Packages can be created in which type of org? A. Developer Sandbox B. Partial Copy SandboxC. Unlimited Edition D. Developer Edition87.) A developer has the following class and trigger code. Which code segment should a developer insert at the XXX to set the baseCost variable to the value of the class variable smokerCharge? A. InsuranceRrCharge B. SmokerCharge() C. ContactTrigger.InsuranceRrCharge D. rCharge88.) A developer can use the debug log to see which three types of information? (Choose three.) A. HTTP callouts to external systems B. Database changes C. Resource usage and limits D. User login events E. Actions triggered by time-based workflow89.) Which three data types can be returned from an SOQL statement? (Choose three.) A. Boolean B. List of sObjects C. Single sObject D. Integer E. String90.) 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 thePosition_c object. The relationship field names are based on the auto-populated defaults. What is the recommended way to display field data from the related Position_c record on a Visualforce page for a single Review_c record? A. Use the Standard Controller for Review_c and cross-object Formula Fields on the Position_c object to display Position_c data. B. Use the Standard Controller for Job_Application_c and a Controller Extension to query for Position_c data. C. Use the Standard Controller for Job_Application_c and cross-object Formula Fieldson the Review_c object to display Position_c data. D. Use the Standard Controller for Review_c and expression syntax in the Page to display related Position_c data through the Job_Application_c object.91.) Which action can a developer take to reduce the execution time of the following code? A. Put the Account loop inside the Contact loop. B. Create an Apex helper class for SOQL. C. Add a GROUP BY clause to the Contact SOQL. D. Use a Map<Id List<Contact> for allContacts.92.) Given the code below, what can be done so that recordCount can be accessed by a test class, but not by a non-test class? A. Change recordCount from private to public. B. Add the SeeAllData annotation to the test class. C. Add the TestVisible annotation to recordCount. D. Add the TestVisible annotation to the MyController class.93.) Which message is logged by the code below? A. Generic Exception B. List Exception C. NullPointer Exception D. No message is logged.94.) Which governor limit applies to all the code in an Apex transaction? A. Elapsed SOQL query timeB. Number of classes called C. Number of new records created D. Elapsed CPU time95.) An Apex transaction inserts 100 Account records and 2,000 Contact records before encountering a DML exception when attempting to insert 500 Opportunity records.T he Account records are inserted by calling the t() method with the allOrNone argument set to false. The Contact and Opportunity records are inserted using the standalone insert statement. How many total records will be committed to the database in this transaction? A. 2,000 B. 2,100 C. 0 D. 10096.) The sales team at Universal Containers would like to see a visual indicator appear on both Account and Opportunity page layouts to alert salespeople when anAccount is late making payments or has entered the collections process. What can a developer implement to achieve this requirement without having to write custom code? A. Formula Field B. Workflow Rule C. Quick Action D. Roll-up Summary Field97.) Which is a valid Apex assignment? A. Integer x=5*1.0; B. Integer x =5.0; C. Double x =5; D. Float x =5.0;98.) The Account object has a custom Percent field, Rating, defined with a length of 2 with 0 decimal places. An Account record has the value of 50% in its Rating field and is processed in the Apex code below after being retrieved from the database with SOQL. What is the value of acctScore after this code executes? public void processAccount() { Decimal acctScore = acct.Rating__c * 100; ... } A. 5 B. 50C. 500 D. 500099.) Which situation prevents a developer from setting sharing rules for a custom object? A. The object's Sharing Settings is set to Public Read/Write. B. The object is on the detail side of a Master-Detail relationship. C. The developer is not a System Administrator. D. The object is referenced in an Owner field of a Master-Detail relationship.100.) A developer wants to store a description of a product that can be entered on separate lines by a user during product setup and later displayed on a Visualforce page for shoppers. Which field type should the developer choose to ensure that the description will be searchable in the custom Apex SOQL queries that are written? A. Text Area B. Text C. Text Area (Long) D. Text Area (Rich)101.) A developer wants multiple test classes to use the same set of test data. How should the developer create the test data? A. Reference a test utility class in each test class. B. Define variables for test records in each test class. C. Create a Test Setup method for each test class. D. Use the SeeAllData=true annotation in each test class.102.) A developer wants to display all of the picklist entries for the Opportunity StageName field and all of the available record types for the Opportunity object on aVisualforce page. Which two actions should the developer perform to get the available picklist values and record types in the controller? (Choose two.) A. Use Schema.RecordTypeInfo returned by Opportunity.SObjectTDescribe().getRecordTypeInfos(). B. Use Schema.PicklistEntry returned by Opportunity.SObjectTDescribe().getPicklistValues (). C. Use Schema.RecordTypeInfo returned by RecordType.SObjectTDescribe().getRecordTypeInfos().D. Use Schema.PicklistEntry returned by Opportunity.StageNDescribe().getPicklistValues ().103.) In order to override a standard action with a Visualforce page, which attribute must be defined in the <apex:page> tag? A. pageReference B. override C. controller D. standardController104.) Which feature allows a developer to create test records for use in test classes? A. Documents B. WebServiceTests C. HttpCalloutMocks D. Static Resources105.) How many levels of child records can be returned in a single SOQL query from one parent object? A. 1 B. 3 C. 5 D. 7106.) Which two declarative process automation features can be directly invoked when a field value changes on a record? (Choose two.) A. Cloud Flow Designer flows B. Process Builder processes C. Validation rules D. Workflow rules107.) How can a developer warn users of SOQL governor limit violations in a trigger? A. Use Messaging.SendEmail() to continue the transaction and send an alert to the user after the number of SOQL queries exceeds the limit. B. Use PageRRedirect() to redirect the user to a custom Visualforce page before the number of SOQL queries exceeds the limit. C. Use LQueries() and display an error message before the number of SOQL queries exceeds the limit. D. Use ApexMessage.Message() to display an error message after the number of SOQL queries exceeds the limit.

Show more Read less
Institution
Salesforce Platform Developer I
Module
Salesforce Platform Developer I











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Salesforce Platform Developer I
Module
Salesforce Platform Developer I

Document information

Uploaded on
May 26, 2025
Number of pages
57
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Salesforce Platform Developer I Study Guide



1.) Which statement results in an Apex compiler error?

A. Map<Id,Lead> lmap = new Map<Id,Lead>([Select ID from Lead Limit 8]);
B. Date d1 = Date.Today(), d2 = Date.ValueOf('2018-01-01');
C. Integer a=5, b=6, c, d = 7;
D. List<string> s = List<string>{'a','b','c');

2.) What are two benefits of the Lightning Component framework? (Choose two.)

A. It simplifies complexity when building pages, but not applications.
B. It provides an event-driven architecture for better decoupling between components.
C. It promotes faster development using out-of-box components that are suitable for
desktop and mobile devices.
D. It allows faster PDF generation with Lightning components.
B. It provides an event-driven architecture for better decoupling between components.


3.) A method is passed a list of generic sObjects as a parameter.What should the
developer do to determine which object type (Account, Lead, or Contact, for example) to
cast each sObject?

A. Use the first three characters of the sObject ID to determine the sObject type.
B. Use the getSObjectType method on each generic sObject to retrieve the sObject
token.
C. Use the getSObjectName method on the sObject class to get the sObject name.
D. Use a try-catch construct to cast the sObject into one of the three sObject types.

4.) What should a developer use to implement an automatic Approval Process
submission for Cases?

A. An Assignment Rule
B. Scheduled Apex
C. Process Builder
D. A Workflow Rule

5.) When viewing a Quote, the sales representative wants to easily see how many
discounted items are included in the Quote Line Items. What should a developer do to
meet this requirement?

A. Create a trigger on the Quote object that queries the Quantity field on discounted

,Quote Line Items.
B. Create a Workflow Rule on the Quote Line Item object that updates a field on the
parent Quote when the item is discounted.
C. Create a roll-up summary field on the Quote object that performs a SUM on the
quote Line Item Quantity field, filtered for only discounted Quote Line Items.
D. Create a formula field on the Quote object that performs a SUM on the Quote Line
Item Quantity field, filtered for only discounted Quote Line Items.

6.) A Developer wants to get access to the standard price book in the org while writing a
test class that covers an OpportunityLineItem trigger. Which method allows access to
the price book?

A. Use Test.getStandardPricebookId() to get the standard price book ID.
B. Use @IsTest(SeeAllData=true) and delete the existing standard price book.
C. Use Test.loadData() and a Static Resource to load a standard price book.
D. Use @TestVisible to allow the test method to see the standard price book.

7.) Which two Apex data types can be used to reference a Salesforce record ID
dynamically? (Choose two.)

A. ENUM
B. sObject
C. External ID
D. String

8.) Where can a developer identify the time taken by each process in a transaction
using Developer Console log inspector?

A. Performance Tree tab under Stack Tree panel
B. Execution Tree tab under Stack Tree panel
C. Timeline tab under Execution Overview panel
D. Save Order tab under Execution Overview panel

9.) Which two platform features align to the Controller portion of MVC architecture?
(Choose two.)

A. Process Builder actions
B. Workflow rules
C. Standard objects
D. Date fields

10.) A developer needs to test an Invoicing system integration. After reviewing the
number of transactions required for the test, the developer estimates that the test data
will total about 2 GB of data storage. Production data is not required for the integration
testing. Which two environments meet the requirements for testing? (Choose two.)

,A. Developer Sandbox
B. Full Sandbox
C. Developer Edition
D. Partial Sandbox
E. Developer Pro Sandbox

11.) A developer working on a time management application wants to make total hours
for each timecard available to application users. A timecard entry has a Master-Detail
relationship to a timecard. Which approach should the developer use to accomplish this
declaratively?

A. A Visualforce page that calculates the total number of hours for a timecard and
displays it on the page
B. A Roll-Up Summary field on the Timecard Object that calculates the total hours from
timecard entries for that timecard
C. A Process Builder process that updates a field on the timecard when a timecard
entry is created
D. An Apex trigger that uses an Aggregate Query to calculate the hours for a given
timecard and stores it in a custom field

12.) A developer encounters APEX heap limit errors in a trigger. Which two methods
should the developer use to avoid this error? (Choose two.)

A. Use the transient keyword when declaring variables.
B. Query and store fields from the related object in a collection when updating related
objects.
C. Remove or set collections to null after use.
D. Use SOQL for loops instead of assigning large queries results to a single collection
and looping through the collection.

13.) Which approach should be used to provide test data for a test class?

A. Query for existing records in the database.
B. Execute anonymous code blocks that create data.
C. Use a test data factory class to create test data.
D. Access data in @TestVisible class variables.

14.) Which approach should a developer take to automatically add a `Maintenance
Plan` to each Opportunity that includes an `Annual Subscription` when an opportunity is
closed?

A. Build a OpportunityLineItem trigger that adds a PriceBookEntry record.
B. Build an OpportunityLineItem trigger to add an OpportunityLineItem record.
C. Build an Opportunity trigger that adds a PriceBookEntry record.
D. Build an Opportunity trigger that adds an OpportunityLineItem record.

, 15.) Which two statements are true about using the @testSetup annotation in an Apex
test class? (Choose two.)

A. The @testSetup annotation cannot be used when the @isTest(SeeAllData=True)
annotation is used.
B. Test data is inserted once for all test methods in a class.
C. Records created in the @testSetup method cannot be updates in individual test
methods.
D. The @testSetup method is automatically executed before each test method in the
test class is executed.

16.) What is the requirement for a class to be used as a custom Visualforce controller?

A. Any top-level Apex class that has a constructor that returns a PageReference
B. Any top-level Apex class that extends a PageReference
C. Any top-level Apex class that has a default, no-argument constructor
D. Any top-level Apex class that implements the controller interface

17.) A Visualforce page is required for displaying and editing Case records that includes
both standard and custom functionality defined in an Apex class called
myControllerExtension.The Visualforce page should include which <apex:page>
attribute(s) to correctly implement controller functionality?

A. controller='Case' and extensions='myControllerExtension'
B. extensions='myControllerExtension'
C. controller='myControllerExtension
D. standardController='Case' and extensions='myControllerExtension'

18.) A newly hired developer discovers that there are multiple triggers on the case
object. What should the developer consider when working with triggers?

A. Developers must dictate the order of trigger execution.
B. Trigger execution order is based on creation date and time.
C. Unit tests must specify the trigger being tested.
D. Trigger execution order is not guaranteed for the same sObject.

19.) How should a developer prevent a recursive trigger?

A. Use a 'one trigger per object' pattern.
B. Use a static Boolean variable.
C. Use a trigger handler.
D. Use a private Boolean variable.

20.) Which three options can be accomplished with formula fields? (Choose three.)

A. Generate a link using the HYPERLINK function to a specific record.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
NurseHenny EXAMS
Follow You need to be logged in order to follow users or courses
Sold
148
Member since
2 year
Number of followers
71
Documents
1877
Last sold
1 day ago
AFFORDABLE EXAMS AND STUDY GUIDES

On this page you will find verified, well elaborated exams and packages, offered by seller NURSE HENNY.

4.3

26 reviews

5
18
4
4
3
0
2
1
1
3

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions