

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
D correct answers 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. B correct answers 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.
Typology: Exams
1 / 41
This page cannot be seen from the preview
Don't miss anything!


































D correct answers 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. B correct answers 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. A correct answers A developer uses a before insert trigger on the Lead object to fetch the Territory__c object, where the Territory__c.PostalCode__c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 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 = terrList[0].Id; Line-06: } Line-07: } Which line of code is causing the code block to fail? A. Line-03: A SOQL query is located inside of the for loop code. B. Line-01: Trigger:new is not valid in a before insert Trigger. C. Line-02: A NullPointer exception is thrown if PostalCode is null. D. Line-05: The Lead in a before insert trigger cannot be updated.
A correct answers 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. A, B correct answers 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. A, B correct answers An org has different Apex Classes that provide Account -related functionality. After a new validation rule is added to the object, many of the test methods fail. What can be done to resolve the failures and reduce the number of code changes needed for future validation rules? Choose 2 answers: 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 methods. D Create a method that queries for valid Account records, and call this method from within test methods. A, B correct answers Which component is available to deploy using Metadata API? Choose 2 answers A. Case Layout B. Account Layout C. Case Feed Layout D. ConsoleLayout B correct answers In the code below, what type does Boolean inherit from? Boolean b= true;
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; ilter Triggers; Workflow Rules; Assignment Rules; Commit D. Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules; Commit A, B correct answers 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 correct answers In an organization that has enabled multiple currencies, a developer needs to aggregate the sum of the Estimated_value__c currency field from the CampaignMember object using a roll-up summary field called Total_estimated_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 CampaignMember 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. C correct answers A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per 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. A, C correct answers 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. A, B, E correct answers 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 relationships away. D correct answers A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing. What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the Salesforce organization? A. Apex Triggers B. HTTP Callouts C. Apex Controllers D. Anonymous Blocks D correct answers 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.
A correct answers 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 though 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. A, B correct answers What is the accurate statement about with sharing keyword? choose 2 answers A) Inner class donot inherit the sharing setting from the container class B) Both inner and outer class can be declared as with sharing C) Either inner class or outer classes can be declared as with sharing but not both D) Inner class inherit the sharing setting from the conatiner class A, B correct answers 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. C correct answers Which standard field needs to be populated when a developer inserts new Contact records programmatically? A. Accountld B. Name C. LastName D. FirstName C correct answers 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. A correct answers What is the minimum log level needed to see user generated debug statements? A. DEBUG B. FINE C. INFO D. WARN A, C correct answers 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 B correct answers To which primitive data type in Apex is a currency field atomically assigned? A. Integer B. Decimal C. Double D. Currency C, D correct answers Which resource can be included in a Lightning Component bundle? Choose 2 answers A. Apex class B. Adobe Flash C. JavaScript D. Documentation
A. Map conMap = (SELECT Name FROM Contact); B. Account[] acctList = new List
When will the email be sent? A. Before Trigger execution B. After Committing to database. C. Before Committing to database D. After Trigger execution. B, C correct answers Which code represents the Controller in MVC architecture on the Force.com 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. B, D correct answers 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 provide Product data entry. 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 Visualforce page for product data entry. D. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify. A correct answers 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. B correct answers 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 {
dowork(); } B. if(Trigger.isRunning) dowork(); C. for (Trigger.isInsert t: Trigger.new) { dowork(); } D. if(Trigger.isInsert) dowork(); A, C correct answers 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. A, B correct answers 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. C correct answers A developer has the following trigger that fires after insert and creates a child Case whenever a new Case is created. List
B correct answers 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. A, D correct answers 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. C correct answers 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 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 correct answers 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) { ... }
D. After Trigger execution. D correct answers 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 exce€ B. By using Messaging.SendEmail() to continue the transaction and send an alert to the user after the number umL statements is exceed 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. A, C correct answers Which user can edit a record after it has been locked for approval? Choose 2 answers A An administrator. B. Any user who approved the record previously. C. A user who is assigned as the current approver. D. Any user- with a higher role in the hierarchy. C, D correct answers Which type of information is provided by the Checkpoints tab in the Developer Console? Choose 2 answers A. Exception B. Debug Statement C. Namespace D. Time C correct answers What is the proper process for an Apex Unit Test? A. Query for test datapsing SeeAllData=true. Call the method being tested. Verify that the results are correct B. Create data for testing. Execute runAllTests(). Verify that the results are correct. C. Create data for testing. Call the method being tested. Verify that the results are correct. D. Query for test data using SeeAllData=true. Execute runAllTests(). Verify that the results are correct. C, D, E correct answers Which declarative method helps ensure quality data?
Choose 3 answers A. Exception handling B. Workflow alerts C. Validation rules D. Lookup filters E. Page layouts A correct answers What is an accurate constructor for a custom controller named "MyController"? A. public MyController() { account = new Account(); } B. public MyController(SObject obj) { account = (Account) obj; } C. public MyController(List
x = 'B'; else if (i < 20 ){ x = 'C'; } else { x = 'D'; } A. B B. C C. D D. A A, C correct answers When can a developer use a custom Visualforce page in a Force.com application? Choose 2 answers A. To create components for dashboards and layouts. B. To deploy components between two organizations. C. To generate a PDF document with application data. D. To modify the page layout settings for a custom object. A correct answers Which statement about the Lookup Relationship between a Custom Object and a Standard Object is correct? A. The Lookup Relationship on the Custom Object can prevent the deletion of the Standard Object. B. The Lookup Relationship cannot be marked as required on the page layout for the Custom Object. C. The Custom Object will be deleted when the referenced Standard Object is deleted. D. The Custom Object inherits security from the referenced Standard Objects C correct answers A reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired. Which action can a developer take to enforce this requirement? A. Create a required comments field. B. Create a formula field. C. Create a validation rule. D. Create a required Visualforce component. C correct answers The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record. What would a developer do to meet this requirement?
A. Create a Workflow Rule on the Opportunity object that updates a field on the parent Account. B. Create a formula field on the Account object that performs a MAX on the Opportunity Close Date field. C. Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field D. Create a trigger on the Account object that queries the Close Date of the most recent Opportunities. A correct answers On which object can an administrator create a roll-up summary field? A. Any object that is on the master side of a master-detail relationship. B. Any object that is on the parent side of a lookup relationship. C. Any object that is on the detail side of a master-detail relationship. D. Any object that is on the child side of a lookup relationship. B correct answers A Visualforce page has a standard controller for an object that has a lookup relationship to a parent object. How can a developer display data from the parent record on the page? A. By using SOQL on the Visualforce page to query for data from the parent record. B. By using merge field syntax to retrieve data from the parent record. C. By adding a second standard controller to the page for the parent record. D. By using a roll-up formula field on the child record to include data from the parent record. A correct answers A developer needs to create a Visualforce page that will override standard Account edit button. The page will be used to validate the account's address using a SOQL query. The page will also allow the user to make edits to the address. Where would the developer write the Account address verification logic? A. In a Controller Extension. B. In a Custom Controller. C. In a Standard Controller. D. In a Standard Extension. B correct answers A developer wants to list all of the Tasks for each Account on the Account detail page. When a Task is created for a Contact what does the developer need to do to display the Task on the related Account record? A. Create an Account formula field that displays the Task information. B. Nothing. The Task is automatically displayed on the Account page. C. Create a Workflow Rule to relate the Task to the Contact's Account. D. Nothing. The Task cannot be related to an Account and a Contact.