Questions Flashcards

1
Q

What 3 steps should be used to allow a custom SVG to be included in a Lightning Web Component?

A

Upload as a static resource

Import the static resource in your component’s JavaScript file

Reference the getter in your HTML template

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A developer needs to include a Visualforce page in the detail section of a page layout for the Account object, but does not see the page as an available option in the Page Layout Editor.
What attribute must be included in <apex:page>?</apex:page>

A

standardController=”Account”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What should a developer do to determine which object type to cast from a list of sObjects?

A

Use getSObjectType to retrieve the sObject token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What two Apex data types can be used to reference a Salesforce record Id dynamically?

A

sObject
String

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can a developer identify the time taken by each process in a transaction in the Developer console?

A

Timeline tab under Execution Overview

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the storage capacities of each sandbox type?

A

Developer - 200MB
Developer Pro - 1GB
Partial Copy - 5GB
Full Copy - same as Prod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What approach should a developer take to add a Maintenance Plan when an Opportunity is closed?

A

Build an Opportunity trigger that adds an OpportunityLineItem record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the requirement for a class to be used as a custom Visualforce controller?

A

Any top-level Apex class that has a default, no argument constructor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How should a developer prevent a recursive trigger?

A

Use a static Boolean variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A developer needs to join to external records with parent records in Salesforce. The dataset does not have the Salesforce Ids of the parent records, but can identify the parent by a foreign key attribute. How can the records be related without knowing the Salesforce Id?

A

Create and populate a custom field on the parent of the type External Id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which 3 options allow custom styling in a Visualforce page?

A

<apex:stylesheet>
Inline CSS
Static Resource
</apex:stylesheet>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which 3 tools can deploy metadata to production?

A

Force.com IDE
Change Set from Sandbox
Metadata API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the Number field map to in Apex as a variable type?

A

Number maps to Decimal (not Integer, as Salesforce Number can define the decimal points as 0 or more)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A developer wants to override a button using Visualforce on an object. What is the requirement?

A

The standardController attribute must be set to the object (when overriding buttons you must use the standardController for the object on which the button appears)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is true of static methods?

A

Initialized only when a class is loaded
Allowed only in outer classes
Excluded from the view state of a Visualforce page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are valid controller options for a custom Visualforce page that will be used as a Dashboard component?

A

Custom controller
Custom controller with extensions
No controller
Reference page bound to the StandardSetController Class

17
Q

What is true for @isTest annotation?

A

A method annotated @isTest(seeAllData=true) in a class @isTest(seeAllData=false) will see all org data
A method annotated @isTest(seeAllData=false) in a class @isTest(seeAllData=true) will see all or data
Profile are visible in a test class even if a class is annotated @isTest(seeAllData=false)

18
Q

What are valid IN clauses for SOSL?

A

{Blank} or ALL FIELDS
EMAIL
NAME
PHONE

19
Q

Where can a developer see overall code coverage?

A

Apex Classes setup page (Esimate code coverage)
Tests Tab in Developer Console

20
Q

What two practices should be used for processing records in a trigger?

A

Use a Map to reduce the number of SOQL calls
Use a Set to ensure unique values in a query filter

21
Q

What tag should a developer include when styling from external CSS in a Visualforce page?

A

apex:stylesheet

22
Q

A developer can use the debug log to see what kinds of information?

A

Database changes
HTTP Callouts
Resources used by Apex
Automated Workflow Processes (not time-based)

23
Q

How many levels of related records can be retrieved in a SOQL query?

A

1 level for Parent to Child
5 levels for Child to Parents, Grandparents

24
Q

How can a developer get all the available Record Types for the current user on the Case object?

A

Use DescribeSObjectResult on the Case object, along with getRecordTypeInfos

25
Q

In the event of an unhandled exception, an external system should be notified of the error - how can be done using publish/subscribe logic?

A

Publish the event using the Eventbus.publish() method and have the external system subscribe to the event using CometD