B. 30 My Platform

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Alessio.russo
A
Alessio.russo
Community Contributor
Quizzes Created: 1 | Total Attempts: 670
Questions: 20 | Attempts: 670

SettingsSettingsSettings
Development Quizzes & Trivia

.


Questions and Answers
  • 1. 

     How can a developer use a to limit the number of records returned by a SOQL query? 

    • A.

      Pass the Set as an argument in a reference to the Database.query() method. 

    • B.

      Reference the Set in the WHERE clause of the query. 

    • C.

      Reference the Set in the LIMIT clause of the query. 

    • D.

      Pass the query results as an argument in a reference to the Set.containsAll() method. 

    Correct Answer
    B. Reference the Set in the WHERE clause of the query. 
    Explanation
    A developer can limit the number of records returned by a SOQL query by referencing the Set in the WHERE clause of the query. This allows the developer to specify a condition that filters the records based on the values in the Set, effectively limiting the results to only those that match the condition.

    Rate this question:

  • 2. 

    The Account object has a custom formula field, Level__c  that is defined as a Formula (Number) with two decimal places.  Which three are valid assignments?  Choose 3 answers

    • A.

      Double myLevel = acct.Level__c;

    • B.

      Decimal myLevel = acct.Level__c;

    • C.

      Object myLevel = acct.Level__c;

    • D.

      Long myLevel = acct.Level__c;

    • E.

      Integer myLevel = acct.Level__c;

    Correct Answer(s)
    A. Double myLevel = acct.Level__c;
    B. Decimal myLevel = acct.Level__c;
    D. Long myLevel = acct.Level__c;
    Explanation
    The given correct answers are valid assignments because they correctly assign the value of the custom formula field "Level__c" to variables of compatible data types.

    - Double myLevel = acct.Level__c; assigns the value as a double data type.
    - Decimal myLevel = acct.Level__c; assigns the value as a decimal data type.
    - Long myLevel = acct.Level__c; assigns the value as a long data type.

    These assignments are valid because the custom formula field is defined as a Formula (Number) with two decimal places, which can be easily assigned to variables of these data types.

    Rate this question:

  • 3. 

    What is a key difference between a Master-Detail Relationship and a Lookup Relationship? 

    • A.

      Lookup Relationship is a required field on an object.

    • B.

      When a record of a master object in a Lookup Relationship is deleted, the detail records are always deleted. 

    • C.

      A Master-Detail Relationship detail record inherits the sharing and security of its master record. 

    • D.

      When a record of a master object in a Master-Detail Relationship is deleted, the detail records are kept and not deleted. 

    Correct Answer
    C. A Master-Detail Relationship detail record inherits the sharing and security of its master record. 
    Explanation
    In a Master-Detail Relationship, the detail record inherits the sharing and security settings of its master record. This means that the detail record will have the same level of access and visibility as the master record. On the other hand, in a Lookup Relationship, there is no automatic inheritance of sharing and security settings. Each record in a Lookup Relationship can have its own independent sharing and security settings.

    Rate this question:

  • 4. 

    What are two benefits of the Lightning Component framework?  Choose 2 answers 

    • A.

      It provides an event-driven architecture for better decoupling between components. 

    • B.

      It allows faster PDF generation with Lightning components. 

    • C.

      It simplifies complexity when building pages, but not applications. 

    • D.

      It promotes faster development using out-of-the-box components that are suitable for desktop and mobile devices. 

    Correct Answer(s)
    A. It provides an event-driven architecture for better decoupling between components. 
    D. It promotes faster development using out-of-the-box components that are suitable for desktop and mobile devices. 
    Explanation
    The Lightning Component framework provides an event-driven architecture, allowing components to communicate with each other without being tightly coupled. This promotes better decoupling between components, making the application more modular and easier to maintain. Additionally, the framework offers out-of-the-box components that are suitable for both desktop and mobile devices, enabling developers to quickly build applications for multiple platforms, thereby promoting faster development.

    Rate this question:

  • 5. 

    A developer wants to display all of the picklist entries for the Opportunity StageName field and all of the available record types for the Opportunity object on a Visualforce page.  Which two actions should the developer perform to get the available picklist values and record types in the controlller?  Choose 2 answers

    • A.

      Use Schema. Record Typelnfo returned by RecordType.SObjectType.getDescribe().getRecordTypeInfos() 

    • B.

      Use Schema. PicklistEntry returned by Opportunity.StageName.getDescribe().getPicklistValues(). 

    • C.

      Use Schema. PicklistEntry returned by Opportunity.SObjectType.getDescribe().getPicklistValues(). 

    • D.

      Use Schema. Record Typelnfo returned by Opportunity.SObjectType.getDescribe().getRecordTypeInfos(). 

    Correct Answer(s)
    B. Use Schema. PicklistEntry returned by Opportunity.StageName.getDescribe().getPicklistValues(). 
    D. Use Schema. Record Typelnfo returned by Opportunity.SObjectType.getDescribe().getRecordTypeInfos(). 
    Explanation
    The developer should use the "Use Schema. PicklistEntry returned by Opportunity.StageName.getDescribe().getPicklistValues()" action to get the available picklist values for the Opportunity StageName field. They should also use the "Use Schema. Record Typelnfo returned by Opportunity.SObjectType.getDescribe().getRecordTypeInfos()" action to get the available record types for the Opportunity object.

    Rate this question:

  • 6. 

    A developer wants to handle the click event for a lightning:button component.  The onclick attribute for the component references a JavaScript function in which resource in the component bundle? 

    • A.

      Helper.js 

    • B.

      Handler.js 

    • C.

      Renderer.js 

    • D.

      Controller.js 

    Correct Answer
    D. Controller.js 
    Explanation
    The correct answer is "controller.js". In the Lightning Component framework, the controller.js file is responsible for handling the client-side logic and event handling for the component. The onclick attribute references a JavaScript function defined in the controller.js file, which is then executed when the lightning:button component is clicked.

    Rate this question:

  • 7. 

    Which statement is true about developing in a multi-tenant environment? 

    • A.

      Governor limits prevent Apex from impacting the performance of multiple tenants on the same instance. 

    • B.

      Apex Sharing controls access to records from multiple tenants on the same instance. 

    • C.

      Global Apex classes can be referenced from multiple tenants on the same instance. 

    • D.

      Org-level data security controls which users can see data from multiple tenants on the same instance. 

    Correct Answer
    A. Governor limits prevent Apex from impacting the performance of multiple tenants on the same instance. 
    Explanation
    Governor limits in Salesforce prevent Apex code from exceeding certain resource limits, such as CPU time, heap size, and database queries. These limits ensure that one tenant's code does not negatively impact the performance of other tenants on the same instance. Therefore, the statement "Governor limits prevent Apex from impacting the performance of multiple tenants on the same instance" is true.

    Rate this question:

  • 8. 

    From which two locations can a developer determine the overall code coverage for a sandbox?  Choose 2 answers

    • A.

      The Apex Test Execution page 

    • B.

      The Apex classes setup page 

    • C.

      The Tests tab of the Developer Console 

    • D.

      The Test Suite Run panel of the Developer Console 

    Correct Answer(s)
    B. The Apex classes setup page 
    C. The Tests tab of the Developer Console 
    Explanation
    A developer can determine the overall code coverage for a sandbox from the Apex classes setup page and the Tests tab of the Developer Console. The Apex classes setup page provides a summary of code coverage for all Apex classes in the sandbox, while the Tests tab of the Developer Console allows the developer to run tests and view the code coverage results.

    Rate this question:

  • 9. 

    Which two roll-up summary field types are required to find the average of values on detail records in a Master-Detail relationship?  Choose 2 answers

    • A.

      Roll-up summary field of type SUM 

    • B.

      Roll-up summary field of type NUM 

    • C.

      Roll-up summary field of type TOTAL 

    • D.

      Roll-up summary field of type COUNT 

    Correct Answer(s)
    A. Roll-up summary field of type SUM 
    D. Roll-up summary field of type COUNT 
    Explanation
    Roll-up summary fields of type SUM and COUNT are required to find the average of values on detail records in a Master-Detail relationship. The SUM roll-up summary field calculates the total sum of the values on the detail records, while the COUNT roll-up summary field counts the number of detail records. By dividing the sum by the count, the average value can be obtained.

    Rate this question:

  • 10. 

    A developer creates a custom controller and custom Visualforce page by using the code block below.  public class MyControIIer {  public String mystring {  get {  if (myString  == null) { mystring  = 'a'; } return mystring;  } private set;  }   public String getMyString( ) {  return 'getMyString ' ; }   public String getStringMethod ( )  if (mystring  == null) {  my String = 'b }' return mystring;  } } { ! StringMethod} , { !mystring} , { !mystring}  < / apex : page >  What can the user expect to see when accessing the custom page? 

    • A.

      B, a, getMyString 

    • B.

      A, b, b

    • C.

      A, a, a

    • D.

      A, b, getMyString 

    Correct Answer
    C. A, a, a
    Explanation
    The user can expect to see "a, a, a" when accessing the custom page. This is because the "mystring" variable is initially set to "a" in the getter method. The "getStringMethod" method does not change the value of "mystring" if it is null, so it remains "a". The "getMyString" method simply returns the string "getMyString". Therefore, when the page is accessed, the values displayed will be "a, a, a".

    Rate this question:

  • 11. 

    Which two approaches optimize test maintenance and support future declarative configuration changes?  Choose 2 answers

    • A.

      Create a method that performs a callout for valid records, then call this method within test methods. 

    • B.

      Create a method that loads valid Account records from a static resource, then call this method within test methods. 

    • C.

      Create a method that creates valid records, then call this method within test methods. 

    • D.

      Create a method that queries for valid records, then call this method within test methods. 

    Correct Answer(s)
    B. Create a method that loads valid Account records from a static resource, then call this method within test methods. 
    C. Create a method that creates valid records, then call this method within test methods. 
    Explanation
    The two approaches that optimize test maintenance and support future declarative configuration changes are:
    1. Creating a method that loads valid Account records from a static resource and calling this method within test methods. This approach allows for easy modification of the static resource to update the test data without changing the test methods.
    2. Creating a method that creates valid records and calling this method within test methods. This approach allows for flexibility in creating test data and easily modifying the method to accommodate future changes in record creation requirements.

    Rate this question:

  • 12. 

     Which two statements are true regarding formula fields?  Choose 2 answers

    • A.

      When concatenating fields, line breaks can be added to improve readability. 

    • B.

      Formula fields may reference formula fields on the same object to a level of one deep. 

    • C.

      When using the & operator to concatenate strings, the result is automatically truncated to fit the destination. 

    • D.

      Fields that are referenced by a formula field can not be deleted until the formula is modified or deleted. 

    Correct Answer(s)
    B. Formula fields may reference formula fields on the same object to a level of one deep. 
    D. Fields that are referenced by a formula field can not be deleted until the formula is modified or deleted. 
    Explanation
    Formula fields can reference other formula fields on the same object up to one level deep. This means that a formula field can use the value of another formula field in its calculation. Additionally, fields that are referenced by a formula field cannot be deleted until the formula field is modified or deleted. This ensures that the formula field always has the necessary data to perform its calculation.

    Rate this question:

  • 13. 

     Which two conditions cause workflow rules to fire?  Choose 2 answers 

    • A.

      Apex Batch process that changes field values 

    • B.

      Changing the territory assignments of accounts and opportunities 

    • C.

      Updating records using the bulk API 

    • D.

      Converting leads to person accounts 

    Correct Answer(s)
    A. Apex Batch process that changes field values 
    C. Updating records using the bulk API 
    Explanation
    Workflow rules are triggered by certain conditions or events. In this case, the two conditions that cause workflow rules to fire are when an Apex Batch process changes field values and when records are updated using the bulk API. These actions can potentially trigger the workflow rules and initiate any associated actions or processes defined within them.

    Rate this question:

  • 14. 

    01 List<Contact> theContacts new ( )  =  new List<Contact>(); 02 for (Account a : Trigger.new) { 03     for (Contact c : [SELECT Id, Account_Date_c FROM Contact WHERE Accountld  = :a.Id]) { 04            c.Account_Date__c = Date.today(); 05            theContacts.add(c); 06 } 07 } 08 update theContacts;  Which line of code is causing the code block to fail? 

    • A.

      08: An exception is thrown if theContacts is empty. 

    • B.

      04: An exception is thrown if Account_Date_c is null. 

    • C.

      03: A SOQL query is located inside of the for loop. 

    • D.

      02: The trigger processes more than 200 records in the for loop. 

    Correct Answer
    C. 03: A SOQL query is located inside of the for loop. 
    Explanation
    The correct answer is 03: A SOQL query is located inside of the for loop. This is because having a SOQL query inside a loop can lead to hitting governor limits and performance issues. It is recommended to bulkify the code by moving the query outside of the loop and using collections to store the queried records.

    Rate this question:

  • 15. 

    Which type of code represents the Model in the MVC architecture on the Force.com platform? 

    • A.

      A Controller Extension method that saves a list of Account records 

    • B.

      A list of Account records returned from a Controller Extension method 

    • C.

      Custom JavaScript that processes a list of Account records 

    • D.

      A Controller Extension method that uses SOQL to query for a list of Account records 

    Correct Answer
    B. A list of Account records returned from a Controller Extension method 
    Explanation
    A list of Account records returned from a Controller Extension method represents the Model in the MVC architecture on the Force.com platform. The Model in MVC is responsible for managing the data and business logic of the application. In this case, the Controller Extension method retrieves a list of Account records, which can be considered as the data representation of the Model. This list of records can then be used by the View and Controller components to display and manipulate the data.

    Rate this question:

  • 16. 

    Which two statements are true about Apex code executed in Anonymous Blocks?  Choose 2 answers

    • A.

      The code runs with the permissions of the logged in user. 

    • B.

      All DML operations are automatically rolled back. 

    • C.

      Successful DML operations are automatically committed. 

    • D.

      The code runs with the permissions of the user specified in the runAs ( ) statement. 

    • E.

      The code runs in system mode having access to all objects and fields. 

    Correct Answer(s)
    A. The code runs with the permissions of the logged in user. 
    C. Successful DML operations are automatically committed. 
    Explanation
    Apex code executed in Anonymous Blocks runs with the permissions of the logged in user, meaning it has the same access and privileges as the user executing the code. Additionally, successful DML operations are automatically committed, meaning any changes made to the database will be saved permanently.

    Rate this question:

  • 17. 

    Opportunity opp [SELECT Id, stageName FROM opportunity LIMIT 1] ;  Given the code above, how can a developer get the label for the stageName field? 

    • A.

      Call 'opp.StageName.getDescribe().getLabel()'.

    • B.

      Call 'Opportunity.StageName.Label'.

    • C.

      Call 'Opportunity.StageName.getDescribe().getLabel().'

    • D.

      Call 'opp.StageName.Label'.

    Correct Answer
    C. Call 'Opportunity.StageName.getDescribe().getLabel().'
    Explanation
    The correct answer is "call 'Opportunity.StageName.getDescribe().getLabel().'" because it correctly accesses the describe information for the stageName field of the Opportunity object and retrieves the label for that field.

    Rate this question:

  • 18. 

    Given the code block:  Integer x;  for (x = 0; < 10; x+=2) {     if (x==8) break;     if (x==10) break;  } system. debug (x) ;  Which value will the system.debug statement display? 

    • A.

      4

    • B.

      10

    • C.

      8

    • D.

      2

    Correct Answer
    C. 8
    Explanation
    The value displayed by the system.debug statement will be 8 because the code block initializes the variable x to 0 and then increments it by 2 in each iteration of the for loop. The loop will break when x is equal to 8 because of the first if statement. Therefore, the value of x at the end of the code block will be 8.

    Rate this question:

  • 19. 

     Which two SOSL searches will return records matching search criteria contained in any of the searchable text fields on an object?  Choose 2 answers

    • A.

      [FIND 'Acme*' IN ANY FIELDS RETURNING Account, Opportunity]; 

    • B.

      [FIND 'Acme*' RETURNING Account, Opportunity]; 

    • C.

      [FIND 'Acme*' IN ALL FIELDS RETURNING Account, Opportunity]; 

    • D.

      [FIND 'Acme*' IN TEXT FIELDS RETURNING Account, Opportunity]; 

    Correct Answer(s)
    B. [FIND 'Acme*' RETURNING Account, Opportunity]; 
    C. [FIND 'Acme*' IN ALL FIELDS RETURNING Account, Opportunity]; 
    Explanation
    The first option, [FIND 'Acme*' IN ANY FIELDS RETURNING Account, Opportunity], will return records that match the search criteria in any searchable field on the Account and Opportunity objects. The second option, [FIND 'Acme*' RETURNING Account, Opportunity], will also return records that match the search criteria in any searchable field on the Account and Opportunity objects. Both options allow for a broad search across all searchable text fields on the specified objects.

    Rate this question:

  • 20. 

    Which two components are available to deploy using the Metadata API?  Choose 2 answers 

    • A.

      Web-to-Case 

    • B.

      Case Settings 

    • C.

      Web-to-Lead 

    • D.

      Lead Conversion Settings 

    Correct Answer(s)
    B. Case Settings 
    D. Lead Conversion Settings 
    Explanation
    The Metadata API allows for the deployment of Case Settings and Lead Conversion Settings. These components can be deployed using the Metadata API to make changes and configurations to the case and lead conversion settings in Salesforce. This API provides a way to automate the deployment process and manage these settings across different environments.

    Rate this question:

Quiz Review Timeline +

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

  • Current Version
  • Aug 27, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 08, 2019
    Quiz Created by
    Alessio.russo
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.