CRI 2

INFO
STADISTICS
RECORDS
TAKE THE TEST
Title of test:
CRI 2

Description:
Teste 123

Author:
Cristianoma
(Other tests from this author)

Creation Date:
22/01/2020

Category:
Others
Share the Test:
Facebook
Twitter
Whatsapp
TAKE THE TEST
Last comments
No comments about this test.
Content:
What are two benefits of the Lightning Component framework? (Choose two.) It simplifies complexity when building pages, but not applications. It provides an event-driven architecture for better decoupling between components. It promotes faster development using out-of-box components that are suitable for desktop and mobile devices. It allows faster PDF generation with Lightning components.
What should a developer use to implement an automatic Approval Process submission for Cases? An Assignment Rule Scheduled Apex Process Builder A Workflow Rule.
In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex? As a List<String> with each value as an element in the list As a String with each value separated by a comma As a String with each value separated by a semicolon As a Set<String> with each value as an element in the set.
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 Test.isRunningTest() within the custom controller.
Which SOQL query successfully returns the Accounts grouped by name? SELECT Type, Max(CreatedDate) FROM Account GROUP BY Name SELECT Name, Max(CreatedDate) FROM Account GROUP BY Name SELECT Id, Type, Max(CreatedDate) FROM Account GROUP BY Name SELECT Type, Name, Max(CreatedDate) FROM Account GROUP BY Name LIMIT 5.
What are three characteristics of static methods? (Choose three.) Initialized only when a class is loaded A static variable outside of the scope of an Apex transaction Allowed only in outer classes Allowed only in inner classes Excluded from the view state for a Visualforce page.
What are two valid options for iterating through each Account in the collection List<Account> named AccountList? (Choose two.) for (Account theAccount : AccountList) {…} for(AccountList) {…} for (List L : AccountList) {…} for (Integer i=0; i < AccountList.Size(); i++) {…}.
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.) Process Builder Apex Trigger Custom Button Workflow Rule.
What is a benefit of using an after insert trigger over using a before insert trigger? An after insert trigger allows a developer to bypass validation rules when updating fields on the new record. An after insert trigger allows a developer to insert other objects that reference the new record. An after insert trigger allows a developer to make a callout to an external service. An after insert trigger allows a developer to modify fields in the new record without a query.
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? Create a lookup field on the Construction Job object to the Machinery object. Create a lookup field on the Machinery object to the Construction Job object. Create a junction object with Master-Detail Relationship to both the Machinery object and the Construction Job object. Create a Master-Detail Lookup on the Machinery object to the Construction Job object.
Which component is available to deploy using Metadata API? Choose 2 answers Case Layout Account Layout Case Feed Layout ConsoleLayout.
Why would a developer use Test. startTest( ) and Test.stopTest( )? To avoid Apex code coverage requirements for the code between these lines To start and stop anonymous block execution when executing anonymous Apex code To indicate test code so that it does not Impact Apex line count governor limits. To create an additional set of governor limits during the execution of a single test class.
A developer wants to handle the click event for a lightning:button component. The on click attribute for the component references a JavaScript function in which resource in the component bundle? Helper.js Handler.js Controller.js Renderer.js.
How can a developer avoid exceeding governor limits when using Apex Triggers? (Choose 2) By using a helper class that can be invoked from multiple triggers By using Maps to hold data from query results By using the Database class to handle DML transactions By performing DML transactions on a list of sObjects.
Which statement is true about developing in a multi-tenant environment? Governor limits prevent apex from impactiong the performance of multiple tenants on the same instance Apex sharing controls access to records fomr multiple tenants on the same instance Global apex classes can be referenced from multiple tenants on the same instance Org-level data security controls which users can see data from multiple tenants on the same instance.
When would the use of Heroku Postgres be appropriate? To cache commonly accessed data for faster retrieval To interconnect Microsoft SQL servers to Heroku Applications. To store and retrieve data using the Structured Query Language. To store user generated pictures and Word documents.
A developer created a Visualforce page with a custom controller to show a list of accounts. The page uses the <apex:SelecList> component, with a variable called "selection", to show the valid values for Account.Type. The page uses an <apex:pageBlockTable> component to display the list of accounts, where the iteration variable is "acct". The developer wants to ensure that when a user selects a type on the <apex : selectList> component, only accounts with that type are shown on the page. What should the developer do to accomplish this? Use the onChange event to update the list of accounts in the controller when the value changes, and then re-render the pageBlockTable. Create multiple lists in the controller that represent the relevant accounts for each account type when the page loads, then reference the correct one dynamically on the pageBlockTable. Add the Rendered={!Acct.type==selection} attribute to the pageBlockTable component Create a component for each option and use a variable with hide parameter on the element.
In the code below, which type does String inherit from? String s = 'Hello World'; Prototype Object Class.
Which user can edit a record after it has been locked for approval? (Choose 2) Any user with a higher role in the hierarchy A user who is assigned as the current approver Any user who approved the record previously An administrator.
An sObject named Application_c has a lookup relationship to another sObject 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 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? By changing Application_c.Status_c into a roll -up summary field. By changing Application_c.Status_c into a formula field. By using an Apex trigger with a DML operation. By configuring a cross-object field update with a workflow.
Which control statement should a developer use to ensure that a loop body executes at least once? For(variable : list_or_set){} While (condition){} For(init_stmt;exit_cond;increment){} Do {} while (cond).
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? Apex Triggers HTTP Callouts Apex Controllers Anonymous Blocks.
A developer needs to write a method that searches for a phone number that could be on multiple object types. Which method should the developer use to accomplish this task? SOQL Query that includes ALL ROWS SOQL query on each object SOSL Query that includes ALL ROWS SOSL query on each object.
What is a benefit of the Lightning Component framework?Choose 3 answers It uses client-side Apex controllers for logic. It uses a traditional publish-subscribe model. It uses an event-driven architecture It uses an MVC architectural design pattern. It uses server-side JavaScript controller for logic.
A Visualforce page uses the Contact standard controller. How can a developer display the Name from the parent Account record on the page? Use the (!contact.Account.Name) merge field syntax. Use an additional standard controller for Accounts. Use SOQL syntax to find the related Accounts Name field. Use additional Apex logic within the controller to query for the Name field.
What is an accurate statement about variable scope? (Choose 3) Parallel blocks can use the same variable name. A variable can be defined at any point in a block. Sub-blocks cannot reuse a parent block's variable name. Sub-blocks can reuse a parent block's variable name if it's value is null. A static variable can restrict the scope to the current block of its value is null.
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: Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application_c object to display Review_c data. Utilize the Standard Controller for Position_c and a Controller Extension to query for Review_c data. Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review_c through the Job_Applicacion_c inject. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.
Which action can a developer take to reduce the execution time of the following code? List<account> allaccounts = [select id from account]; list<account> allcontacts = [select id, accountid from contact]; for (account a :allaccounts){ for (contact c:allcontacts){ if(c.accountid = a.id){ //do work } } } Use a map <id,contact> for allaccounts Add a group by clause to the contact SOQL Put the account loop inside the contact loop Create an apex helper class for the SOQL.
Which option should a developer use to create 500 Accounts and make sure that duplicates are not created for existing Account Sites? Data Import Wizard Salesforce-to-Salesforce Sandbox template Data Loader.
A developer created an Apex trigger using the Developer Console and now wants to debug codeHow can the developer accomplish this in the Developer Console? Select the Override Log Triggers checkbox for the trigger Add the user name in the Log Inspector. Open the Progress tab in the Developer Console. Open the logs tab in the Developer Console.
Which two queries can a developer use in a Visualforce controller to protect against SOQL injection vulnerabilities? Choose 2 answers A. String qryName = % + String.enforceSecurityChecks(name)+ % ; String qryString = SELECT Id FROM Contact WHERE Name LIKE :qryNAme ; List queryResults = Database.query(qryString); B. String qryName = % + name % ; String qryString = SELECT Id FROM Contact WHERE Name LIKE :qryNAme ; List queryResults = Database.query(qryString); C. String qryName = % + String.escapeSingleQuotes(name)+ % ; String qryString = SELECT Id FROM Contact WHERE Name LIKE :qryNAme ; List queryResults = Database.query(qryString); D. String qryString = SELECT Id FROM Contact WHERE Name LIKE :qryNAme ; List queryResults = Database.query(qryString);.
Report abuse Terms of use
CREATE TEST
We use cookies to personalize your experience. If you continue browsing you will be accepting its use. More information.