Podcast
Questions and Answers
A method is passed a list of generic sObjects as a parameter. What should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject?
A method is passed a list of generic sObjects as a parameter. What should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject?
Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? Choose 2 answers.
Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? Choose 2 answers.
Which tool allows a developer to send requests to the Salesforce REST APIs and view the responses?
Which tool allows a developer to send requests to the Salesforce REST APIs and view the responses?
What is a capability of the ltng:require tag that is used for loading external Javascript libraries in Lightning Components? Choose 3 answers.
What is a capability of the ltng:require tag that is used for loading external Javascript libraries in Lightning Components? Choose 3 answers.
Signup and view all the answers
What should a developer consider when working with multiple triggers on the case object?
What should a developer consider when working with multiple triggers on the case object?
Signup and view all the answers
In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex?
In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex?
Signup and view all the answers
Which two statements are true about using the @testSetup annotation in an Apex test class? Choose 2 answers.
Which two statements are true about using the @testSetup annotation in an Apex test class? Choose 2 answers.
Signup and view all the answers
What are three characteristics of static methods? Choose 3 answers.
What are three characteristics of static methods? Choose 3 answers.
Signup and view all the answers
What should a developer do to deploy a Visualforce page with a custom controller?
What should a developer do to deploy a Visualforce page with a custom controller?
Signup and view all the answers
Which three attributes need to be defined with values in the apex:commandButton tag to create a custom button for the Account object? Choose 3 answers.
Which three attributes need to be defined with values in the apex:commandButton tag to create a custom button for the Account object? Choose 3 answers.
Signup and view all the answers
How should a developer implement setting a picklist field to 'Monitor' on any new Leads owned by a subset of Users?
How should a developer implement setting a picklist field to 'Monitor' on any new Leads owned by a subset of Users?
Signup and view all the answers
Which two environments meet the requirements for testing a system integration that requires about 2 GB of data storage? Choose 2 answers.
Which two environments meet the requirements for testing a system integration that requires about 2 GB of data storage? Choose 2 answers.
Signup and view all the answers
What are three ways for a developer to execute tests in an org? Choose 3 answers.
What are three ways for a developer to execute tests in an org? Choose 3 answers.
Signup and view all the answers
Which three declarative fields are correctly mapped to variable types in Apex? Choose 3 answers.
Which three declarative fields are correctly mapped to variable types in Apex? Choose 3 answers.
Signup and view all the answers
Which two ways should a developer create functionality to generate and save a PDF quote document formatted using the company’s branding guidelines? Choose 2 answers.
Which two ways should a developer create functionality to generate and save a PDF quote document formatted using the company’s branding guidelines? Choose 2 answers.
Signup and view all the answers
What action will allow the developer to relate records in the data model without knowing the Salesforce ID?
What action will allow the developer to relate records in the data model without knowing the Salesforce ID?
Signup and view all the answers
When is an Apex Trigger required instead of a Process Builder Process?
When is an Apex Trigger required instead of a Process Builder Process?
Signup and view all the answers
Which attributes should be included in a Visualforce page to correctly implement controller functionality?
Which attributes should be included in a Visualforce page to correctly implement controller functionality?
Signup and view all the answers
Which two exceptions may occur when executing a query to retrieve a list of contacts for each account?
Which two exceptions may occur when executing a query to retrieve a list of contacts for each account?
Signup and view all the answers
In which two ways can a developer retrieve the available fields for an object if the variable myObject represents the name of the object? Choose 2 answers.
In which two ways can a developer retrieve the available fields for an object if the variable myObject represents the name of the object? Choose 2 answers.
Signup and view all the answers
What should a developer do to assign machinery to different construction jobs and track the dates and costs associated with the jobs?
What should a developer do to assign machinery to different construction jobs and track the dates and costs associated with the jobs?
Signup and view all the answers
Which approach should a developer use to make total hours for each timecard available to application users?
Which approach should a developer use to make total hours for each timecard available to application users?
Signup and view all the answers
Which two valid options exist for iterating through each Account in the collection List named AccountList? Choose 2 answers.
Which two valid options exist for iterating through each Account in the collection List named AccountList? Choose 2 answers.
Signup and view all the answers
Which SOQL query successfully returns the Accounts grouped by name?
Which SOQL query successfully returns the Accounts grouped by name?
Signup and view all the answers
Which approach should a developer use to add pagination to a Visualforce Page?
Which approach should a developer use to add pagination to a Visualforce Page?
Signup and view all the answers
What is a requirement for a class to be used as a custom Visualforce controller?
What is a requirement for a class to be used as a custom Visualforce controller?
Signup and view all the answers
What is the end result when attempting to change the API name of a field that is referenced in an Apex test class?
What is the end result when attempting to change the API name of a field that is referenced in an Apex test class?
Signup and view all the answers
Which two strategies should a developer use to lock down Opportunities from editing when reaching the Closed/Won stage? Choose 2 answers.
Which two strategies should a developer use to lock down Opportunities from editing when reaching the Closed/Won stage? Choose 2 answers.
Signup and view all the answers
Study Notes
Developer Practices and Tips
- Use the
getSObjectType
method on each generic sObject to determine object types. - Avoid governor limits by using SOQL for loops and methods from the "Limits" class.
- The Workbench REST Explorer is a useful tool for sending requests to Salesforce REST APIs.
Lightning Components and JavaScript
- Loading external JavaScript libraries in Lightning Components allows specifying loading order, loading scripts in parallel, and preventing duplicate script loading.
Trigger Management
- Multiple triggers on an object do not guarantee execution order for the same sObject.
- A before insert trigger is recommended to set default values in new records.
Apex Data Representations
- Multi-select picklist values are represented as a string separated by semicolons in Apex.
- The
@testSetup
annotation allows certain test data to be inserted once for all test methods, and cannot be used with@isTest(SeeAllData=True)
.
Apex and Visualforce Requirements
- Static methods are initialized when a class loads and are excluded from Visualforce view state.
- Deploying a Visualforce page requires creating a test class that provides coverage for the custom controller.
Button and Attribute Configurations
- For custom buttons, attributes such as
extensions
,action
, andrenderAs
must be defined in the<apex:page>
tag for functionality.
Data Management and Relationships
- To assign machinery to jobs and track associated costs, create a junction object with Master-Detail relationships to both machinery and construction job objects.
- Roll-Up Summary fields are an effective tool for calculating totals from related records declaratively.
SOQL Queries and Object Field Retrieval
- Use
Schema.describeSObjects(new String[] {myObject})...fields.getMap()
to retrieve available fields for an object. - The first field in a SOQL query's GROUP BY clause must always be the field being aggregated.
Controller Class Requirements
- Custom Visualforce controllers must be top-level Apex classes with a default constructor that does not take arguments.
Data and Debugging Behavior
- Changing an API name in Schema Builder does not automatically update related references in test classes, which may lead to issues.
Strategies for Data Control
- To lock Opportunities from editing at Closed/Won stage, use a trigger or validation rule for enforcement.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge on Salesforce Apex development practices, including trigger management, data representations, and Lightning component usage. This quiz covers essential tips for efficient Salesforce development and best practices to avoid governor limits.