Topic 2 : Exam Pool B
Which two number expression evaluate correctly? Choose 2 answers
A.
Integer I = 3.14159;
B.
Decimal D = 3.14159;
C.
Long I = 3.14159;
D.
Double D =3.14159;
Decimal D = 3.14159;
Double D =3.14159;
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.
Add test methods to existing test classes from previous deployments.
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.escpaeSingleQuotes(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);
String qryName = '%' + String.enforceSecurityChecks(name)+ '%'; String qryString = 'SELECT Id
FROM Contact WHERE Name LIKE :qryNAme'; List queryResults = Database.query(qryString);
String qryString = 'SELECT Id FROM Contact WHERE Name LIKE :qryNAme'; List queryResults = Database.query(qryString);
What are two correct examples of the model in the salesforce MVC architecture? Choose 2 answers.
A.
Custom field on the custom wizard_c object
B.
Standard lightning component
C.
Workflow rule on the contact object
D.
Standard account lookup on the contract object
Standard lightning component
Workflow rule on the contact object
A developer is creating an application to track engines and their parts. An individual part can be used in
different types of engines.What data model should be used to track the data and to prevent orphan records?
A.
Create a junction object to relate many engines to many parts through a master-detail relationship
B.
Create a lookup relationship to represent how each part relates to the parent engine object.
C.
Create a master-detail relationship to represent the one-to-many model of engines to parts.
D.
Create a junction object to relate many engines to many parts through a lookup relationship
Create a junction object to relate many engines to many parts through a master-detail relationship
On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID that is passed on the URL?
A.
Use the constructor method for the controller.
B.
Use the $Action.View method in the Visualforce page.
C.
Create a new PageReference object with the Id.
D.
Use the tag in the Visualforce page.
Use the constructor method for the controller.
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?
A.
Select the Override Log Triggers checkbox for the trigger
B.
Add the user name in the Log Inspector.
C.
Open the Progress tab in the Developer Console.
D.
Open the logs tab in the Developer Console
Open the logs tab in the Developer Console
Which code segment can be used to control when the dowork() method is called?
A.
For (Trigger.isRunning t: Trigger.new) { dowork(); }
B.
If(Trigger.isRunning) dowork();
C.
For (Trigger.isInsert t: Trigger.new) { dowork(); }
D.
If(Trigger.isInsert) dowork();
If(Trigger.isInsert) dowork();
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?
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.
By using an Apex trigger with a DML operation.
A developer tasked with creating a schema to track Movies, Actors, and contracts. A single movie can have many contracts and a single actor can have many contracts. Each contract is owned and actively managed by a single user. Which schema should be created to enable user to easily manage the contract they own; without requiring access to the movie or the actor records?
A.
A master detail relationship to the movie object and a lookup relationship to the actor object
B.
A lookup relationship to the movie object and a lookup relationship to the actor object
C.
A lookup relationship to the movie object and a master detail relationship to the actor object
D.
A master detail relationship to the movie object and a master detail relationship to the actor object
A lookup relationship to the movie object and a lookup relationship to the actor object
Page 19 out of 39 Pages |
Previous |