How should a developer write unit tests for a private method in an Apex class?
How should a developer write unit tests for a private method in an Apex class?A . Use the SeeAllData annotation.B . Add a test method in the Apex class.C . Use the TestVisible annotation.D . Mark the Apex class as global.View AnswerAnswer: C
Which SOQL query will get the record for the Viridian City gym and it's trainers?
A custom object Trainer_c has a lookup field to another custom object Gym___c. Which SOQL query will get the record for the Viridian City gym and it's trainers?A . SELECT Id, (SELECT Id FROM Trainers) FROM Gym_C WHERE Name . Viridian City Gym'B . SELECT Id, (SELECT Id FROM Trainer_c)...
What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exist?
developer created this Apex trigger that calls MyClass .myStaticMethod: trigger myTrigger on Contact (before insert) ( MyClass.myStaticMethod(trigger.new, trigger.oldMap); } The developer creates a test class with a test method that calls MyClass.mystaticMethod, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two...
what are the methods used to show input in classic and lightning ?
what are the methods used to show input in classic and lightning ?A . Use visualforce page in classic and lightning component in lightningView AnswerAnswer: A
Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers
Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answersA . Upload the SVG as a static resource.B . Import the static resource and provide a getter for it in JavaScript.C . Reference the getter in the HTML template.D . Reference the...
Which two operations can be performed using a formula field? Choose 2 answers
Which two operations can be performed using a formula field? Choose 2 answersA . Displaying the last four digits of an encrypted Social Security numberB . Triggering a Process BuilderC . Displaying an Image based on the Opportunity AmountD . Calculating a score on a Lead based on the information...
Which two will restrict the records correctly?
A developer must create an Apex class, contactcontroller, that a Lightning component can use to search for Contact records. User of the Lightning component should only be able to search Contact records to which they have access. Which two will restrict the records correctly?A . public class ContactControllerB . public...
Which tool should be used to implement this requirement?
A developer has a requirement to create an Order When an Opportunity reaches a "Closed-Won" status. Which tool should be used to implement this requirement?A . Process BuilderB . Lightning ComponentC . LightningD . Apex triggerView AnswerAnswer: A
Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits?
A developer has to identify a method in en Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a SOQL statement to save the changes to the database. Which two techniques should the...
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Whithin the class, the developer identifies the following method as a security threat: List<Contact> performSearch(String lastName){ return Database.query('Select Id, FirstName, LastName FROM Contact WHERE LastName Like %'+lastName+'%); } What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 answers
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Whithin the class, the developer identifies the following method as a security threat: List<Contact> performSearch(String lastName){ return Database.query('Select Id, FirstName, LastName FROM Contact WHERE LastName Like %'+lastName+'%); } What are two...