Questions
ayuda
option
My Daypo

ERASED TEST, YOU MAY BE INTERESTED ONPlat 1

COMMENTS STATISTICS RECORDS
TAKE THE TEST
Title of test:
Plat 1

Description:
Platform for computer science 1

Author:
kutti
(Other tests from this author)

Creation Date:
18/01/2020

Category:
Others

Number of questions: 72
Share the Test:
Facebook
Twitter
Whatsapp
Share the Test:
Facebook
Twitter
Whatsapp
Last comments
No comments about this test.
Content:
1) In which two trigger types can a developer modify the new sObject records that are obtained by the trigger.new context? Choose 2 answers A. after insert B. after update C. before update D. before insert.
2) A developer wants multiple test classes to use the same set of test data. How should the developer create the test data? A. Define variables for test records in each test class. B. Create a Test Setup method for each test class. C. Use the SeeAllData=true annotation in each test class. D. Reference a test utility class in each test class.
3) Account acct = [SELECT Id FROM Account LIMIT 1]; Given the code above, how can a developer get the type of object from acct.? A. Call "acct.getSObjectType()". B. Call "Account.getSObJectType()". C. Call "Account.SObjectType". D. Call "acct.SObjectType".
4) Which two statements can a developer use to throw a custom exception of type MissingFieldValueException? Choose 2 answers A. throw (MissingFieldValueException, 'Problem occurred'); B. throw new MissingFieldValueException(Problem occurred'); C. throw new MissingFieldValueException(); D. throw Exception(new MissingFieldValueException());.
5) Given the code block: Integer x; for(x = 0; x<10; x+=2) { if(x8) break; if(x10) break; Calculator system.debug(x); Which value will the system.debug statement display? A. 4 B. 2 C. 10 D. 8 .
6) Which three statements are accurate about variable scope? Choose 3 answers A. Parallel blocks can reuse the same variable name. B. A sub -block can reuse a parent block's variable name if it is static. C. A variable can be declared at any point In a block. D. A variable must be declared before it can be referenced In a block. E. A sub -block can reuse a parent block's variable name if it is not static.
7) To which primitive data type is a Text Area (Rich) field automatically assigned? A. Text B. Blob C. Object D. String.
8) Which three methods help ensure quality data? Choose 3 answers A. Creating a lookup filter. B. Adding an error to a field in a before trigger. C. Sending an email alert using a workflow rule. D. Handling an exception in Apex. E. Adding a validation rule.
9) Which standard field is required when creating a new Contact record? A. LastName B. Name C. Accountld D. FirstName.
10) From which two locations can a developer determine the overall code coverage for a sandbox? Choose 2 answers A. The Test Suite Run panel of the Developer Console B. The Apex dasses setup page C. The Apex Test Execution page D. The Tests tab of the Developer Console.
11) A Visualforce page uses the Contact standard controller. How can a developer display the Name from the parent Account record on the page? A. Use SOQL syntax to find the related Accounts Name field. B. Use the {!contact.Account.Name} merge field syntax. C. Use an additional standard controller for Accounts. D. Use additional Apex logic within the controller to query for the Name field.
12) Which type of code represents the View in the MVC architecture on the Force.com platform? A. An Apex method in an extension that returns a list of Cases B. An Apex method that executes SOQL to retrieve a list of Cases C. A Vlsualforce page that displays Information about Case records by Iterating over a list of Cases. D. Validation rules for a page layout that includes a related list of Cases .
13) What is the data type returned by the following SOSL search? [FIND 'Acme" IN NAME FIELDS RETURNING Account, Opportunity]; A. List<ListcAccount>, Ust<Opportunity> B. Map<sObject, sObject> C. Map<Id, sObject> D. List<List<sObject>.
14) A developer runs the following anonymous code block in a Salesforce org with 100 Accounts. List<Account> acc = [SELECT Id FROM Account LIMIT 10]; Delete acc; Database.emptyRecycleBin(acc); system.debug(Limits.getLimitQueries()+', .+Limits.getLimitDMI.Statements()); What is the debug output? A. 1, 2 B. 10, 2 C. 100, 150 D. 150, 100.
15) A developer is creating an enhancement to an application that will allow people to be related to their employer. Which data model provides the simplest solution to meet the requirements? A. Create a lookup relationship to indicate that a person has an employer. B. Create a master -detail relationship to indicate that a person has an employer. C. Create a junction object to relate many people to many employers through master -detail relationships. D. Create a junction object to relate many people to many employers through lookup relationships.
16)Which two queries can a developer use in a Visualforce controller to protect against SOQL injection vulnerabilities? Choose 2 answers Single Book A. String qryName = String.escapeSingleOuotes(name); String qryString = SELECT Id FROM Contact WHERE Name LIRE + gryName - List<Contact> queryResult = Database.query(qryString); B. String qryName = '95 + String.enforceSecurityChecks(name) + String qryString = 'SELECT Id FROM Contact WHERE Name LIKE :ciryName.; List<Contact> queryResult = Database.query(qryString); C. String queryName = '%' + name + '%'; String qryString = SELECT /d FROM Contact WHERE Name LIKE :qryName'; List<Contact> queryResult = Database.query(qryString); D. String qryString = 'SELECT Id FROM Contact WHERE Name LIKE \"6' + name + List<Contact> queryResult = Database.query(qryString);.
17) An Apex trigger falls because It exceeds governor limits. Which two techniques should a developer use to resolve the problem? Choose 2 answers A. Use the Database class to handle DML operations. B. Use Maps to reference related records. C. Use SOQL Aggregate queries to retrieve child records. D. Use Lists for all DML operations.
18) Potential home buyers working with a real estate company can make offers on multiple properties that are listed with the real estate company. Offer amounts can be modified; however, the property that has the offer cannot be modified after the offer Is placed. What should be done to associate offers with properties in the schema for the organization? A. Create master -detail relationships In the Contact object to both the Property and Offer custom objects. B. Create a lookup relationship in the Property custom object to the Offer custom object. C. Create a master -detail relationship in the Offer custom object to the Property custom object. D. Create a lookup relationship In the Offer custom object to the Property custom object.
19) What are two benefits of the Lightning Component framework? Choose 2 answers A. It provides an event -driven architecture for better decoupling between components. B. It allows faster PDF generation with Lightning components. C. It simplifies complexity when building pages, but not applications. D. It promotes faster development using out -of -the -box components that are suitable for desktop and mobile.
20) What is the debug output of the following Apex code? Decimal thevalue; System.debug(theValue); A. undefined B. Calculator C. null D. 0.0.
21) Given the code below, what can be done so that record count can be accessed by a test class, but not by a non -test class? public class MyController private Integer recordCount; A. Add the SeeAllData annotation to the test class. B. Add the TestVisible annotation to recordCount. C. Change recordCount from private to public. D. Add the TestVisible annotation to the MyController class. .
22) A developer needs to save a List of existing Account records named myAccounts to the database, but the records do not contain Salesforce Id values. Only the value of a custom text field configured as an External ID with an API name of Foreign_Key_c is known. Which two statements enable the developer to save the records to the database without an Id? Choose 2 answers A. Database.upsert (myAccounts, Foreign_Key_c); B. Database. u psert( myAccou nts).Foreign_Key_c ; C. Upsert myAccounts(Foreign_Key_c); D. Upsert myAccounts Foreign_Key_c; .
23) A developer is notified that a text field is being automatically populated with invalid values. However, this should be prevented by a custom validation rule that is in place. What could be causing this? A. The field is being populated by a workflow field update. B. A DML exception is occurring during the save order of execution. C. The field Is being populated by a before trigger. D. The user belongs to a permission set that suppresses the validation rule.
24) How can a developer set up a debug log on a specific user? A. Set up a trace flag for the user, and define a logging level and time period for the trace. 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. It is not possible to setup debug logs for users other than yourself. .
25) A developer needs to update an unrelated object when a record gets saved. Which two trigger types should the developer create? Choose 2 answers A. after insert B. after update C. before update D. before insert.
26) What can be used to delete components from production? A. A change set deployment with the delete option checked B. An ant migration tool deployment with a destructiveChanges XML file and the components to delete in the package.xml file C. A change set deployment with a destructiveChanges XML file D. An ant migration tool deployment with a destructiveChanges XML file and an empty package.xml file.
27) Given the code below, which three statements can be used to create the controller variable? public class AccountListController { public List<Account> getAccounts() { return controller.getRecords(); } } Choose 3 answers A. ApexPages.StandardSetController controller = new ApexPages.StandardSetController(Database.getQueryLocator( SELECT Id FROM Account')); B. ApexPages.StandardController controller =new ApexPages.StandardController((SELECT Id FROM Account)); C. ApexPages.StandardController controller = new ApexPages.StandardController(Database.getQueryLocatoWSELECT Id FROM ACCOUNT')); D. ApexPages.StandardSetController controller = new ApexPages.StandardSetController(Database.guery('SELECT Id FROM Account')); E. ApexPages.StandardSetController controller = new ApexPages.StandardSetController(Database.getQueryLocator((SELECT Id FROM Account)));.
28) Which three statements are true regarding the @isTest annotation? Choose 3 answers A. Products and Priceboolcs are visible in a test even if a class is annotated @isTest (SeeAllData=false). B. A method annotated @isTest (SeeAliData=false) in a class annotated @isTest (SeeAliData=true) has access to all org data. C. A method annotated eisTest (SeeAllData=true) in a class annotated eierest (SeeAllData=false) has access to all org data. D. Profiles are visible in a test even if a class is annotated @ isiest (SeeAllData=false). E. A class containing test methods counts toward the Apex code limit regardless of any @isTest annotation.
29) Candidates are reviewed by four separate reviewers and their comments and scores which range from 1 (lowest) to 5 (highest) are stored on a review record that is a detail record for a candidate. What is the best way to indicate that a combined review score of 15 or better is required to recommend that the candidate come in for an interview? A. Use a Validation Rule on a total score field on the candidate record that prevents a recommended field from being true if the total score is less than 15. B. Use a Workflow Rule to calculate the sum of the review scores and send an email to the hiring manager when the total is 15 or better. C. Use Visual Workflow to set a recommended field on the candidate whenever the cumulative review score is 15 or better. D. Use a Rollup Summary field to calculates the sum of the review scores, and store this in a total score field on the candidate.
30) A developer needs to include a Visualforce page in the detail section of a page layout for the Account object, but does not see the page as an available option In the Page Layout Editor. Which attribute must the developer include in the <apex:page> tag to ensure the Visualforce page can be embedded in a page layout? A. controller="Account" B. extensions="AccountController" C. standardController="Account" D. action="Accountld" .
31) 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. An Apex trigger that uses an Aggregate Query to calculate the hours for a given timecard and stores it in a custom field B. A Visualforce page that calculates the total number of hours for a timecard and displays it on the page C. A Process Builder process that updates a field on the timecard when a timecard entry is created D. A Roll -Up Summary field on the Timecard Object that calculates the total hours from timecard entries for that timecard .
32) What is a key difference between a Master -Detail Relationship and a Lookup Relationship? A. When a record of a master object in a Lookup Relationship Is deleted, the detail records are always deleted. B. When a record of a master object in a Master -Detail Relationship is deleted, the detail records are kept and not Case deleted. C. Lookup Relationship is a required field on an object. D. Master -Detail Relationship detail record inherits the sharing and security of its master record.
33) 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 2 answers A. Use the getRecordTypeInfosByDeveloperName0 method in the DescribeSObjectResult class. B. make an outbound web services call to the SOAP API. C. Execute a SOQL query on the RecordType object. D. Hardcode the ID as a constant in an Apex class.
34) A developer created a Visualforce page using a custom controller that calls an Apex helper class. A method In the helper class hits a governor limit. What is the result of the transaction? A. The helper class creates a savepoint and continues. B. All changes in the transaction are rolled back. C. All changes made by the custom controller are saved. D. The custom controller calls the helper class method again.
35) Which statement is true about a Hierarchical relationship as it pertains to User records? A. lilt uses a junction object and lookup relationships to allow many User records to be related to many other User records. B. It uses a junction object and master -detail relationships to allow many User records to be related to many other User records. C. It uses a master -detail relationship to allow one User record to be related to another User record. D. It uses a special lookup relationship to allow one User record to be related to another User record.
36) 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 page that provides coverage of the custom controller. B. Create a test page that provides coverage of the Visualforce page. C. Create a test class that provides coverage of the Visualforce page. D. Create a test class that provides coverage of the custom controller.
37) Which three data types can be returned from an SOQL statement? A. Boolean B. List of sObjects C. String D. Integer E. Single sObject.
38) 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 Calculator C. standardController D. controller.
39) What is a benefit of using a trigger framework? A. Simplifies addition of context -specific logic B. Allows functional code to be tested by a test class C. Increases trigger governor limits D. Reduces trigger execution time .
40) What are three techniques that a developer can use to invoke an anonymous block of code? Choose 3 answers A. Create a Visualforce page that uses a controller class that is declared without sharing B. Type code into the Developer Console and execute it directly. C. Type code into the Execute Anonymous tab in the Force.com IDE and click Execute. D. Use the SOAP API to make a call to execute anonymous code. E. Create and execute a test method that does not specify a runAs() call.
41) What are two characteristics of partial copy sandboxes versus full sandboxes? Multiple Books Choose 2 answers A. Includes a subset of metadata B. requires a sandbox template C. supports more frequent refreshes D. provides more data record storage.
42) Which two statements are true about Apex code executed in Anonymous Blocks? Choose 2 answers A. The code runs with the permissions of the logged in user. B. The code runs with the permissions of the user specified in the runAs() statement. C. The code runs in system mode having access to all objects and fields. D. Successful DML operations are automatically committed. E. All DML operations are automatically rolled back.
43) An after trigger on the Account object performs a DML update operation on all of the child Opportunities of an Account. There are no active triggers on the Opportunity object, yet a "maximum trigger depth exceeded" error occurs in certain situations. Which two reasons possibly explain the Account trigger firing recursively? Choose 2 answers A. Changes are being made to the Account during Criteria Based Sharing evaluation. B. Changes are being made to the Account during an unrelated parallel save operation. C. Changes to Opportunities are causing cross -object workflow field updates to be made on the Account. D. Changes to Opportunities are causing roll -up summary fields to update on the Account.
44) Which control statement should a developer use to ensure that a loop body executes at least once? A. for (variable : list_or_set) {…} B. while (condition) {…} C. for (init_stmt; exit_condition; increment_stmt) {..} D. do {…} while (condition) .
45) A developer wrote the following after insert trigger to create a follow-up Task whenever a new Task is created. List<Task> followupTasks = new List<Task>(); for ( Task theTask Trigger.new )( Task newTask = new Task(Status = New, Priority = 'Normal'); newTask.Subject = 'Follow-up for ' + theTask.Subject; newTask.ActivityDate = Date.today().adddays(30); followupTasks.add( newTask ); insert followupTasks; C) What happens after the code block executes? A. The trigger fails if the Task Subject is blank. B. A new Task is created for each Task in Trigger.new. Written C. The trigger enters an Infinite loop and eventually falls. D. Multiple Tasks are created for each Task in Trigger.new.
46) A developer needs to import customer subscription records into Salesforce and attach them to existing Account records. Which two actions should the developer take to ensure the subscription records are related to the correct Account records? Choose 2 answers A. Match an External Id Text field to a column In the Imported file. B. Match an Auto -Number field to a column in the Imported file. C. Match the Name field to a column in the imported file. D. Match the Id field to a column in the Imported file.
47) 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 3 answers A. Use a custom controller. B. Use a custom controller with extensions. C. Use a standard controller with extensions. D. Do not specify a controller. E. Use a standard controller.
48) A developer needs to apply the look and feel of Lightning Experience to a number of applications built using a custom third -party lavaScript framework and rendered in Visualforce pages.Which option achieves this? A. Set the attribute enableLightning to "true" in the definition. B. Replace the third -party lavaScript library with Calculator native Visualforce tags. C. Configure the User Interface options In the Setup menu to enable Legacy Mode for Visualforce. D. Incorporate Salesforce Lightning Design System CSS stylesheets into the lavaScript applications.
49) 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. public void processAccount() ( Decimal acctScore = acct.Rating c*100; What is the value of acctScore after this code executes? A. 5 B.50 C. 500 D. 5000.
50) A developer can use the debug log to see which three types of information? Choose 3 answers A. Resource usage and limits B. Database changes C. User login events Calculator D. HTTP callouts to external systems E. Actions triggered by time -based workflow.
51) Which feature allows a developer to create test records for use in test classes? A. Static Resources B. Documents C. HttpCalloutMocks D. WebServiceTests.
52) 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.
53) What is an accurate constructor for a custom controller named MyContactListController? A. public MyContactLiatController(ApexPages.StandardController stdController) { Account a = (Account) stdController.getRecord(); contacts = a.Contacts; } B. public MyContactListController(ApexPages.StandardSetController stdSetController) { contacts = (List<Contact>) stdSetController.getRecords(); } C. public MyContactListController(List<sObject> records) { contacts = (List<Contact>) records; } D. public MyContactLIstController() { contacts = new List<Contact>(); }.
54) Which three statements are true regarding cross -object formulas? Choose 3 answers A. Cross -object formulas can reference fields from master -detail or lookup relationships. B. Cross -object formulas can reference fields from objects that are up to 10 relationships away. C. Cross -object formulas can expose data the user does not have access to in a record. D. Cross -object formulas can reference child fields to perform an average. E. Cross -object formulas can be referenced in roll -up summary fields.
55) Which governor limit applies to all the code in an Apex transaction? A. Elapsed CPU time B. Number of new records created C. Number of classes called D. Elapsed SOQL query time .
56) Which action can a developer take to reduce the execution time of the following code? List<Account> allAccounts = [SELECT Id FROM Account); List<Contact> allContacts = [SELECT Id, AccountId FROM Contact]; for (Account a allAccounts){ for (Contact c: allContacts){ if (c.Account/d = a. Id) { // do work } } } A. Use a Map <Id, Contact> for allContacts. B. Add a GROUP BY clause to the Contact SOQL. C. Put the Account loop inside the Contact loop. D. Create an Apex helper class for the SOQL.
57) A Platform Developer needs to implement a declarative solution that will display the most recent Closed Won date for all Opportunity records associated with an Account. Which field is required to achieve this declaratively? A. Roll -up summary field on the Opportunity object B. Cross -object formula field on the Account object C. Roll -up summary field on the Account object D. Cross -object formula field on the Opportunity object.
58) A developer has JavaScript code that needs to be called by controller functions in multiple components by extending a new abstract component. Which resource in the abstract component bundle allows the developer to achieve this? A. controller.js Calculator B. superRender.js C. renderer.js D. helper.js.
59) Which two automation tools include a graphical designer? Choose 2 answers A. Approvals B. Flow Builder C. Process Builder D. Workflows.
60) How can a developer get all of the available record types for the current user on the Case object? A. Use SOQL to get all Cases. B. Use DescnbeSObjectResult of the Case object. C. Use Case.getRecordTypes(). D. Use DescribeFieldResult of the Case.RecordType field.
61) A developer needs to automatically populate the Reports To field in a Contact record 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.
62) To which data type in Apex a currency field automatically assigned? A. Integer B. Decimal C. Double D. Currency.
63) Which type of 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.
64) Which action can a developer perform in a before update trigger? Choose 2 answers A. Update the original object using an update DML operation. B. Delete the original object using a delete DML operation. C. Change field values using the Trigger.new context variable. D. Display a custom error message in the application interface.
65) How should the developer overcome this problem? While writing a test class that covers an OpportunityLineltem trigger, a Developer is unable to create a standard Pricebook since one already exist in the org. A. Use @IsTest(SeeAllData=true) and delete the existing standard Pricebook. B. Use @TestVisible to allow the test method to see the standard Pricebook. C. Use Test.getStandardPricebbokld()to get the standard Pricebook ID. D. Use Test.loaddata() and a Static Resource to load a standard Pricebook.
66) 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.
67) A developer runs the following anonymous code block: List<Account> acc = [select id from Account limit 10]; Delete acc; Database.emptyRecycleBin(acc); System.debug(Limits.getDMLStatements() + ' + Limits.getLimitDMLStatements()); What is the result? A. 11, 150 B. 150, 2 C. 150, 11 D. 2, 150.
68) Which tool can deploy destructive changes to apex classes in production? A. Workbench B. Salesforce setup C. Change Sets D. Developer Console.
69) Which type of controller should a developer use to include a list of related records for a custom object record on a visualforce page without needing additional test coverage? A. Custom Controller B. List Controller C. Controller Extension D. Standard Controller.
70) A change set deployment from a sandbox to production fails due to a failure in a managed package unit test. The developer spoke with the managed package owner and they determined it is false positive and can be ignored. What should the developer do to successfully deploy? A. Edit the managed package's unit test B. Select "Fast Deploy" to run only the tests that are in the change set C. Select "Run local tests" to run only the tests that are in the change set D. Select "Run local tests" to run all tests in the org that are not in the managed package.
71) Which two condition cause workflow rules to fire? Choose 2 answers A. Changing territory assignments of accounts and opportunities B. Updating record using bulk API C. Converting leads to person account D. An Apex batch process that changes field values.
72) In which of the following scenarios org data is visible to the test methods Class annotated with @isTest(SeeAllData=true) and method annotated @isTest(SeeAllData=false) A.
Report abuse Consent Terms of use