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 Alessio.russo
A
Alessio.russo
Community Contributor
Quizzes Created: 1 | Total Attempts: 691
| Attempts: 691 | Questions: 20
Please wait...
Question 1 / 20
0 %
0/100
Score 0/100
1. 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? 

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.

Submit
Please wait...
About This Quiz
B. 30 My Platform - Quiz

B. 30 My Platform quiz assesses knowledge in Salesforce development, focusing on SOQL queries, data modeling, and the Lightning Component framework. It evaluates key developer skills in handling data and building efficient Salesforce applications.

Personalize your quiz and earn a certificate with your name on it!
2. What are two benefits of the Lightning Component framework?  Choose 2 answers 

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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".

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

Submit
16.  How can a developer use a to limit the number of records returned by a SOQL 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.

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

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.

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

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.

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

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.

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

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.

Submit
View My Results

Quiz Review Timeline (Updated): Aug 27, 2023 +

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
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Given the code block:  ...
What are two benefits of the Lightning Component framework?  ...
What is a key difference between a Master-Detail Relationship and a...
Which statement is true about developing in a multi-tenant...
Which two roll-up summary field types are required to find the average...
 Which two conditions cause workflow rules to fire?  ...
01 List<Contact> theContacts new ( )  =  new...
Which two components are available to deploy using the Metadata...
A developer creates a custom controller and custom Visualforce page by...
Which two approaches optimize test maintenance and support future...
 Which two statements are true regarding formula fields?  ...
Opportunity opp [SELECT Id, stageName FROM opportunity LIMIT 1]...
A developer wants to handle the click event for a lightning:button...
Which type of code represents the Model in the MVC architecture on the...
Which two statements are true about Apex code executed in Anonymous...
 How can a developer use a to limit the number of records...
From which two locations can a developer determine the overall code...
 Which two SOSL searches will return records matching search...
A developer wants to display all of the picklist entries for the...
The Account object has a custom formula field,...
Alert!

Advertisement