Dev II

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Romiero
R
Romiero
Community Contributor
Quizzes Created: 1 | Total Attempts: 1,516
| Attempts: 1,516 | Questions: 11
Please wait...
Question 1 / 11
0 %
0/100
Score 0/100
1. On which object can an administrator create a roll-up summary field?

Explanation

An administrator can create a roll-up summary field on any object that is on the master side of a master-detail relationship. This is because a roll-up summary field calculates values from related records and displays the result on the master record. In a master-detail relationship, the master record controls the behavior and access to the detail records, making it the appropriate object to create a roll-up summary field.

Submit
Please wait...
About This Quiz
Dev II - Quiz

.

Personalize your quiz and earn a certificate with your name on it!
2. 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?

Explanation

The code block first queries for 10 Account records and stores them in the acc variable. Then, it attempts to delete the acc variable, which is not possible because it is a List and not an individual record. The code then tries to empty the recycle bin for the acc variable, but since it is not a record, this operation does not affect the recycle bin. Finally, the system.debug() statement outputs the number of DML statements used and the limit for DML statements, which is 2 and 150 respectively. Therefore, the result is 2, 150.

Submit
3. When the number of record in a recordset is unknown, which control statement should a developer use to implement a set of code that executes for every record in the recordset, without performing a .size() or .length() method call?

Explanation

The correct answer is "For (variable : list_or_set) { }". This control statement is known as a "for-each" loop and is used to iterate through elements in a list or set without needing to know the size of the collection beforehand. It automatically handles the iteration and provides access to each element in the collection one at a time.

Submit
4. What is the result when a Visualforce page calls an Apex controller, which calls another Apex class, which then results in hitting a governor limit?

Explanation

When a Visualforce page calls an Apex controller, which in turn calls another Apex class, if hitting a governor limit occurs, any changes made up to the error will be rolled back. This means that any modifications or updates made before reaching the governor limit will not be saved and will be reverted back to their previous state.

Submit
5. What is the easiest way to verify a user before showing them sensitive content?

Explanation

The easiest way to verify a user before showing them sensitive content is by calling the generateVerificationUrl method in apex. This method generates a verification URL that can be sent to the user. By clicking on the URL, the user can be redirected to a verification page where they can confirm their identity before accessing the sensitive content. This method eliminates the need for sending SMS or email messages with passcodes, making it a simpler and more efficient verification process.

Submit
6. Which one do you like?

Explanation

not-available-via-ai

Submit
7. 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?

Explanation

In order to retrieve a record by using an ID passed on the URL in a Visualforce page with a custom controller, the developer should use the constructor method for the controller. This method allows the developer to access the ID parameter from the URL and use it to query the record from the database. By retrieving the record in the constructor, the developer can then use it to populate the page fields or perform any necessary operations.

Submit
8. Where can debug log filter settings be set? Choose 2 answers

Explanation

The debug log filter settings can be set in two places. First, they can be set by clicking on the "Filters" link next to the monitored user's name within the web UI. Second, they can be set on the "Log Filters" tab on a class or trigger detail page.

Submit
9. What features are available when writing apex test classes? (Choose 2 Answers)

Explanation

The two features available when writing apex test classes are the ability to set and modify the CreatedDate field in apex tests and the ability to select testing data using csv files stored in the system.

Submit
10. Which statement about the Lookup Relationship between a Custom Object and a Standard Object is correct?

Explanation

The correct answer is that the Custom Object will be deleted when the referenced Standard Object is deleted. This is because a Lookup Relationship creates a dependency between the two objects, where the Custom Object relies on the existence of the Standard Object. If the Standard Object is deleted, the Custom Object no longer has a valid reference and is also deleted.

Submit
11. A developer has the following code block:   public class PaymentTax { public static decimal SalesTax = 0.0875; }  trigger OpportunityLineItemTrigger on OpportunityLineItem (before insert, before update) { PaymentTax PayTax = new PaymentTax(); decimal ProductTax = ProductCost * XXXXXXXXXXX; }  To calculate the productTax, which code segment would a developer insert at the XXXXXXXXXXX to make the value the class variable SalesTax accessible within the trigger?

Explanation

The SalesTax variable is defined as a public static variable within the PaymentTax class.

Since it is public static, it can be accessed using the class name PaymentTax followed by the variable name SalesTax.

Therefore, PaymentTax.SalesTax is the correct syntax to access the value of SalesTax within the trigger.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 11, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 11, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • May 27, 2020
    Quiz Created by
    Romiero
Cancel
  • All
    All (11)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
On which object can an administrator create a roll-up summary field?
A developer runs the following anonymous code block: ...
When the number of record in a recordset is unknown, which control...
What is the result when a Visualforce page calls an Apex controller,...
What is the easiest way to verify a user before showing them sensitive...
Which one do you like?
On a Visualforce page with a custom controller, how should a developer...
Where can debug log filter settings be set? Choose 2 answers
What features are available when writing apex test...
Which statement about the Lookup Relationship between a Custom Object...
A developer has the following code block: ...
Alert!

Advertisement