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
SettingsSettings
Please wait...
  • 1/11 Questions

    On which object can an administrator create a roll-up summary field?

    • Any object that is on the master side of a master-detail relationship.
    • Any object that is on the parent side of a lookup relationship.
    • Any object that is on the detail side of a master-detail relationship.
    • Any object that is on the child side of a lookup relationship.
Please wait...
Dev II - Quiz
About This Quiz

.


Quiz Preview

  • 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?

    • 11, 150

    • 150, 2

    • 150, 11

    • 2, 150

    Correct Answer
    A. 2, 150
    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.

    Rate this question:

  • 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?

    • For (init_stmt, exit_condition; increment_stmt) { }

    • Do { } While (Condition)

    • For (variable : list_or_set) { }

    • While (Condition) { ... }

    Correct Answer
    A. For (variable : list_or_set) { }
    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.

    Rate this question:

  • 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?

    • Any changes up to the error are saved.

    • Any changes up to the error are rolled back.

    • All changes before a savepoint are saved.

    • All changes are saved in the first Apex class.

    Correct Answer
    A. Any changes up to the error are rolled back.
    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.

    Rate this question:

  • 5. 

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

    • Sending the user a SMS message with a passcode.

    • Calling the generateVerificationUrl method in apex.

    • Sending the user an Email message with a passcode.

    • Calling the Session.forcedLoginUrl method in apex.

    Correct Answer
    A. Calling the generateVerificationUrl method in apex.
    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.

    Rate this question:

  • 6. 

    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?

    • Use the constructor method for the controller

    • Use the $Action.View method in the Visualforce page

    • Create a new PageReference object with the Id.

    • Use the tag in the Visualforce page.

    Correct Answer
    A. Use the constructor method for the controller
    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.

    Rate this question:

  • 7. 

    Which one do you like?

    • Option 1

    • Option 2

    • Option 3

    • Option 4

    Correct Answer
    A. Option 1
  • 8. 

    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.

    Correct Answer(s)
    A. The Filters link by the monitored user's name within the web UI
    A. The Log Filters tab on a class or trigger detail page.
    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.

    Rate this question:

  • 9. 

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

    • The ability to select error types to ignore in the developer console.

    • The ability to write assertions to test after a @future method.

    • The ability to set and modify the CreatedDate field in apex tests.

    • The ability to set breakpoints to freeze the execution at a given point

    • The ability to select testing data using csv files stored in the system. 

    Correct Answer(s)
    A. The ability to set and modify the CreatedDate field in apex tests.
    A. The ability to select testing data using csv files stored in the system. 
    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.

    Rate this question:

  • 10. 

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

    • The Lookup Relationship on the Custom Object can prevent the deletion of the Standard Object.

    • The Lookup Relationship cannot be marked as required on the page layout for the Custom Object.

    • The Custom Object will be deleted when the referenced Standard Object is deleted.

    • The Custom Object inherits security from the referenced Standard Objects

    Correct Answer
    A. The Custom Object will be deleted when the referenced Standard Object is deleted.
    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.

    Rate this question:

  • 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?

    • SalesTax

    • PayTax.SalesTax

    • PaymentTax.SalesTax

    • OpportunityLineItemTngger.SalesTax

    Correct Answer
    A. PaymentTax.SalesTax
    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.

    Rate this question:

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
Back to Top Back to top
Advertisement