Docsity

Salesforce Platform Developer I Dumps latest upload, Exams of Advanced Education

Toggle sidebar
bg1
1
/
56
Salesforce Platform Developer I Dumps latest upload
1. 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.: D
2. 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 callback constructor to reference the StandardController.
D. A constructor that intrializes a private Opportunity variable.: B
3. A developer uses a before insert trigger on the Lead object to fetch
the Terri-tory
c object, where the Territory
c.PostalCode
c matches
the Lead.Postal-Code. The code fails when the developer uses the
Apex Data Loader to insert 10,000 Lead records. The developer has
the following code block:
Line-01: for (Lead l :
Trigger.new){ Line-02: if
(l.PostalCode != null) {
Line-03: List<Territory c>
terrList = [SELECT Id FROM Territory c
WHERE PostalCode c = :l.PostalCode];
Line-04: if(terrList.size() > 0)
Line-05: l.Territory c =
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Partial preview of the text

Download Salesforce Platform Developer I Dumps latest upload and more Exams Advanced Education in PDF only on Docsity!

Salesforce Platform Developer I Dumps latest upload

  1. 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.: D
  2. 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 callback constructor to reference the StandardController. D. A constructor that intrializes a private Opportunity variable.: B
  3. A developer uses a before insert trigger on the Lead object to fetch the Terri-tory c object, where the Territory c.PostalCode c matches the Lead.Postal-Code. The code fails when the developer uses the Apex Data Loader to insert 10,000 Lead records. The developer has the following code block: Line-01: for (Lead l : Trigger.new){ Line-02: if (l.PostalCode != null) { Line-03: List terrList = [SELECT Id FROM Territory c WHERE PostalCode c = :l.PostalCode]; Line-04: if(terrList.size() > 0) Line-05: l.Territory c =

terrList[0].Id; Line-06: } Line-07: } Which line of code is causing the code block to fail?

method from within test methods.: A, B

  1. Which component is available to deploy using Metadata API? Choose 2 answers A. Case Layout B. Account Layout C.Case Feed Layout D.ConsoleLayout: A, B
  2. In the code below, what type does Boolean inherit from? Boolean b= true; A. Enum B. Object C.String D.Class: B
  3. What is the preferred way to reference web content such as images, style sheets, 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 CON. D.By uploading the content as a Static Resource.: D
  4. 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: B
  5. A developer creates a Workflow Rule declaratively that updates a field on an object. An Apex update trigger exists for that

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.: D

  1. What is true for a partial sandbox that is not true for 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.: A, D
  2. In which order does SalesForce execute events upon saving a record? A. Before Triggers; Validation Rules; After Triggers; Assignment Rules; Work-flow Rules; Commit B. Validation Rules; Before Triggers; After Triggers; Workflow Rules; Assign-ment Rules; Commit C.Before Triggers; Validation Rules; ilter Triggers; Workflow Rules; Assign-ment Rules; Commit D.Validation Rules; Before Triggers; After Triggers; Assignment Rules; Work-flow Rules; Commit: A
  3. 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.: A, B

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.: A, C

  1. 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 collect of records from a child relationship. E.Formula fields can reference fields from objects that are up to 10 relation-ships away.: A, B, E
  2. 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 set-tings for the user who executes the code in the Salesforce organization? A. Apex Triggers B. HTTP Callouts C.Apex Controllers D.Anonymous Blocks: D
  3. 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.: D

  1. 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 types to a list of sObjects C.A map of sObject types to a list oflists of sobjects D.a list of sObjects.: A
  2. 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 SObjects.: C, D
  3. What is a correct pattern to follow when programming in Apex on a Mul-ti-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 concur- rency 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.: C
  4. What should a developer working in a sandbox use to exercise a new test Class before the developer deploys that test 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.: B, C

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.: A, B

  1. Which standard field needs to be populated when a developer inserts new Contact records programmatically? A. Accountld B. Name C.LastName D.FirstName: C
  2. 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 coverage is 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.: C

  1. What is the minimum log level needed to see user generated debug state-ments? A. DEBUG B. FINE C.INFO D.WARN: A
  2. Developer needs to automatically populate the ReportsTo field in a Contact record based on the values of the 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: A, C
  3. To which primitive data type in Apex is a currency field atomically assigned? A. Integer B. Decimal C.Double D.Currency: B
  4. Which resource can be included in a Lightning Component bundle? Choose 2 answers

cString = 'Method2'; return cString; } }

{!cString}, {!StringMethod1}, {!StringMethod2}, {!cString}

What does the user see when accessing the custom page? A. getMyString, B. , , Method2, C.Method2, getMyString D. getMyString„ Method2, getMyString: B

  1. What is a valid Apex statement? A. Map conMap = (SELECT Name FROM Contact); B. Account[] acctList = new List{new Account()} C.Integer w, x, y = 123, z = 'abc', D private static constant Double rate = 775;: B
  2. A developer has a single custom controller class that works with a Visual-force 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 con-troller? A. public ExtendedController (ApexPages.StandardController cntrl) { } B. ApexPages.currentPage().getParameters().put('input', 'TestValue') C.Test.setCurrentPage(pageRef), D.String nextPage = controller.save().getUrl();: D
  1. A developer wants to display all of the available record types for a Case ob-ject. 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().getPicklist-Values(). B. Use Schema.RecordTypeinfo returned by Case.SObjectType getDe-scribe().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 picklist field.: A, B
  2. An sObject named Application_c has a lookup relationship to another sOb-ject 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 Applica-tion_c needs to be populated automatically with the same value, and execute a workflow rule on Application_c. How 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.: B
  3. 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?

C.By accessing the Trigger.newMap context variable. D.By accessing the Tripper.newList context variable.: A

  1. 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 < 250; 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: B
  1. The Review_c object have a lookup relationship to the job_Application_c object. The job_Application_c object has a master detail relationship up to the position_c object. The relationship is based on the auto populated defaults? What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record? Select one of the following: 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 through the Job_Applicacion_c inject. D.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.: D

  1. 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.: B, D
  2. Which code segment can be used to control when the dowork() method is called? A. for (Trigger.isRunning t: Trigger.new) { dowork(); } B. if(Trigger.isRunnin g) dowork(); C.for (Trigger.isInsert t: Trigger.new) { dowork(); } D.if(Trigger.isInser t) dowork();: D
  3. When would a developer use a custom controller instead of a controller extension?
  1. 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 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.: B
  2. 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.: A, D
  3. A developer needs to create records for the object Property c .The devel-oper creates the following code block: 01 List 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 record have errors and fails to be created? A. Database.insert(propertiesToCreate, System.ALLOW_PARTIAL); B. insert propertiesToCreate,

C.Database.insert(propertiesToCreate, false); D.Database.insert(propertiesToCreate): C

  1. When the number of record in a recordset is unknown, which control statement should a developer use to implement a set of code that executes for every record in the recordset, without performing a .size() or .length() method call? A. For (init_stmt, exit_condition; increment_stmt) { } B. Do { } While (Condition) C.For (variable : list_or_set) { } D.While (Condition) { ... }: C
  2. 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.: B
  3. A developer has the following code block: public class PaymentTax { public static decimal SalesTax = 0.0875; } trigger OpportunityLineItemTrigger on OpportunityLineItem (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?