





































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






































































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. - correct answer ✅D 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. - correct answer ✅B 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 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. - correct answer ✅A 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. - correct answer ✅A
Which component is available to deploy using Metadata API? Choose 2 answers A. Case Layout B. Account Layout C. Case Feed Layout D. ConsoleLayout - correct answer ✅A, B In the code below, what type does Boolean inherit from? Boolean b= true; A. Enum B. Object C. String D. Class - correct answer ✅B 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. - correct answer ✅D 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 - correct answer ✅B 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. - correct answer ✅D What is true for a partial sandbox that is not true for a full sandbox? Choose 2 answers:
D. Match an auto -generated Number field to a column in the imported file. - correct answer ✅A, B 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 curren - correct answer ✅A 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. - correct answer ✅C 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. - correct answer ✅A, C 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.
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. - correct answer ✅A 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. - correct answer ✅C, D 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. - correct answer ✅C 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. - correct answer ✅B, C A company that uses a Custom object to track candidates would like to send candidate information automatically to a third -party human resource system when a candidate is hired. 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. - correct answer ✅D
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. - correct answer ✅A, B Which standard field needs to be populated when a developer inserts new Contact records programmatically? A. Accountld B. Name C. LastName D. FirstName - correct answer ✅C 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. - correct answer ✅C What is the minimum log level needed to see user generated debug statements? A. DEBUG B. FINE C. INFO D. WARN - correct answer ✅A 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 - correct answer ✅A, C To which primitive data type in Apex is a currency field atomically assigned?
When creating unit tests in Apex, which statement is accurate? A. Unit tests with multiple methods result in all methods failing 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 - correct answer ✅D public class customController { public string cString { get; set;} public string getStringMethod1(){ return cString; } public string getStringMethod2(){ if(cString == null) 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 - correct answer ✅B 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; - correct answer ✅B 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?
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. 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. - correct answer ✅B 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. - correct answer ✅B 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. - correct answer ✅B, C 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. - correct answer ✅B, D 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.