CRI 5

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

Description:
Teste 123

Author:
cristianoma@gmail.com
(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:
A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension. The Visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality? controller=“Case” and extensions=“myControllerExtension” extensions=“myControllerExtension” controller=“myControllerExtension” standardController=“Case” and extensions=“myControllerExtension”.
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 two.) Make an outbound web services call to the SOAP API. Hardcode the ID as a constant in an Apex class. Use the getRecordTypeInfosByName() method in the DescribeSObjectResult class. Execute a SOQL query on the RecordType object.
A developer created a Lightning component to display a short text summary for an object and wants to use it with multiple Apex classes. How should the developer design the Apex classes? Have each class define method getObject() that returns the sObject that is controlled by the Apex class. Extend each class from the same base class that has a method getTextSummary() that returns the summary. Have each class implement an interface that defines method getTextSummary() that returns the summary. Have each class define method getTextSummary() that returns the summary.
Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.) The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used. Test data is inserted once for all test methods in a class. Records created in the @testSetup method cannot be updates in individual test methods. The @testSetup method is automatically executed before each test method in the test class is executed.
How should a developer prevent a recursive trigger? Use a “one trigger per object” pattern. Use a static Boolean variable. Use a trigger handler. Use a private Boolean variable.
When viewing a Quote, the sales representative wants to easily see how many discounted items are included in the Quote Line Items. What should a developer do to meet this requirement? Create a trigger on the Quote object that queries the Quantity field on discounted Quote Line Items. Create a Workflow Rule on the Quote Line Item object that updates a field on the parent Quote when the item is discounted. Create a roll-up summary field on the Quote object that performs a SUM on the quote Line Item Quantity field, filtered for only discounted Quote Line Items. Create a formula field on the Quote object that performs a SUM on the Quote Line Item Quantity field, filtered for only discounted Quote Line Items.
A developer executes the following query in Apex to retrieve a list of contacts for each account: List<account> accounts = [Select ID, Name, (Select ID, Name from Contacts) from Account] ; Which two exceptions may occur when it executes? (Choose two.) CPU limit exception due to the complexity of the query. SOQL query row limit exception due to the number of contacts. SOQL query limit exception due to the number of contacts. SOQL query row limit exception due to the number of accounts.
An org has a single account named ‘NoContacts’ that has no related contacts. Given the query: List<Account> accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name=‘NoContacts’]; What is the result of running this Apex? accounts[0].contacts is invalid Apex. accounts[0].contacts is an empty Apex. accounts[0].contacts is Null. A QueryException is thrown.
Why would a developer consider using a custom controller over a controller extension? To increase the SOQL query governor limits. To implement all of the logic for a page and bypass default Salesforce functionality To leverage built-in functionality of a standard controller To enforce user sharing settings and permissions.
Which approach should a developer take to automatically add a “Maintenance Plan” to each Opportunity that includes an “Annual Subscription” when an opportunity is closed? Build a OpportunityLineItem trigger that adds a PriceBookEntry record. Build an OpportunityLineItem trigger to add an OpportunityLineItem record. Build an Opportunity trigger that adds a PriceBookEntry record. Build an Opportunity trigger that adds an OpportunityLineItem record.
What is a capability of the Developer Console? Execute Anonymous Apex code, Create/Edit code, view Debug Logs. Execute Anonymous Apex code, Run REST API, create/Edit code. Execute Anonymous Apex code, Create/Edit code, Deploy code changes. Execute Anonymous Apex code, Run REST API, deploy code changes.
Manage package can be created in which type of org? Partial copy sandbox Unlimited edition Developer Edition Developer sandbox.
A developer created a helper class with a method that can be called from Visualforce pages, web services, triggers, and of even anonymous code. When the method is called from a trigger, the developer needs to execute logic that should not be executed If the method Is called from anywhere else. How can the developer determine if the code Is executed in a trigger context? Check if System.executionContext ==’Trigger’. Use the executeOnTrigger annotation on the method definition. Check if Trigger.isExecuting ==true Check if Trigger.newMap !=null.
A developer needs to find information about @future methods that were invoked. From which system monitoring feature can the developer see this information? Scheduled jobs Apex Jobs Background Jobs Asynchronous Jobs.
Where can debug log filter settings be set?Choose 2 answers The Filters link by the monitored user's name within the web UI. The Show More link on the debug log's record. On the monitored user's name. The Log Filters tab on a class or trigger detail page.
Which two statements are acceptable for a developer to use inside procedural loops? Contact con = new Contact(); ContactList.remove(i); Delete contactList; Account a = [SELECT id, Name FROM account WHERE id = : con.AccountId LIMIT 1];.
Which two statements are true regarding formula fields? Choose 2 answers When using the & operator to concatenate strings, the result is automatically truncated to fit the destination. Fields that are referenced by formula field can not be deleted until the formula is modified or deleted. When concatenating fields, line breaks can be added to improve readability. Formula fields may reference formula field on the same object to a level of one deep.
What is the value of x after the code segment executes?String x = 'A';Integer i = 10;if ( i < 15 ) {i = 15;x = 'B';} else if ( i < 20 ) {x = 'C';} else {x = 'D'; } D A B C.
Which two combined methods should a developer use to prevent more than one open Opportunity on each Account? Choose 2 answers A. Create an Account Roll-up Summary field to count open Opportunities B. Create an Opportunity Validation Rule to generate an error on insert C. Create an Account Trigger to generate an error on Opportunity insert D. Create an Opportunity Workflow Rule to auto-close the Opportunity.
A developer needs to create an audit trail for records that are sent to the recycle bin. Which type of trigger is most appropriate to create? A. Before delete B. After undelete C. After delete D. Before undelete.
Which governor limit applies to all the code in an apex transaction? Elapsed CPU time Number of new records created Number of classes called Elapsed SOQL query time.
A developer declared a class as follow. public class wysiwyg { // Properties and methods including DML } Which invocation of a class method will obey the organization-wide defaults and sharing settings for the running user in the Salesforce Organization? An Apex Trigger that invokes a helper method in this class A Visualforce page with an Apex controller that invokes a method in this class A user on an external system that has an API call into Salesforce that invokes a method in this class A developer using the Developer Console that invokes a method in this class from the execute anonymous window.
Which three statements are true regarding cross-object formulas? Choose 3 answers Cross-object formulas can reference fields from master-detail or lookup relantionships Cross-object formulas can reference fields from objects that are up to 10 relantionship away Cross-object formulas can expose data the user does not have access to in a record Cross-object formulas can reference child fields to perform an average Cross-object formulas can be referenced in roll-up summary field.
What is considered the primary purpose for creating Apex tests? To confirm all classes and triggers compile successfully To ensure every use case of the application is covered by a test To confirm every trigger in executed at least once To guarantee at least 50% of code is covered by unit tests before it is deployed.
What is the result of the following code block ? Integer x = 1;Integer Y = 0;While(x < 10){Y++;} An error occurs Y = 9 Y = 10 X = 0.
A custom exception "RecordNotFoundException" is defined by the following code of block.public class RecordNotFoundException extends Exception()which statement can a developer use to throw a custom exception?choose 2 answers Throw new RecordNotFoundException("problem occured"); Throw new RecordNotFoundException(); throw RecordNotFoundException("problem occured"); Throw RecordNotFoundException();.
What is the accurate statement about with sharing keyword? choose 2 answers Inner class do not inherit the sharing setting from the container class Both inner and outer class can be declared as with sharing Either inner class or outer classes can be declared as with sharing but not both Inner class inherit the sharing setting from the container class.
The initial value for a number field on a record is 1. A user updated the value of the number field to 10. This action invokes a workflow field update, which changes the value of the number field to 11. After the workflow field update, an update trigger fires.What is the value of the number field of the object that is obtained from Trigger.old? NULL 11 1 10.
In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex? As a String with each value separated by a comma As a Set with each value as an element in the set As a String with each value separated by a semicolon As a List with each value as an element in the list Previous.
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? 101 100 102 252.
A developer wants to use all of the functionality provided by the standard controller for an object, but needs to override the Save standard action in a controller extension. Which two are required in the controller extension class? Create a method named Save with a return data type of PageReference. Create a method that references this.superSave() Define the class with a constructor that takes an instance of StandardController as a parameter. Define the class with a constructor that creates a new instance of the StandardController class.
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.