Salesforce PD2 Certification Study

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What should be specified along with the @RestResource annotation to expose a REST web service?

A case-sensitive urlMapping value. The URL mapping is appended to the base endpoint to form the endpoint for the REST web service

In order to use custom Apex logic on a Visualforce page with a standard controller,

A controller extension must be used

What does an aggregate SOQL query return?

AggregateResult objects

An Apex transaction is complete when

All the Apex code has finished running

What does Remote Objects do?

Allows developers to perform simple CRUD operations through js without Apex

The finally block of a try-catch-finally construct runs when?

Always, regardless of whether an exception was thrown

Apex code can be invoked from a process using

An Apex action and an Apex class with a method using the @InvocableMethod annotation

What Apex method can be used in a controller or controller extension to display custom error messages?

ApexPages.addMessage()

A flow can be invoked through a custom Lightning component using a

Lightning flow component

What happens if a StandardSetController implementation is instantiated with a query locator returning more than 10,000 records?

LimitException is thrown

What exception is thrown when a governor limit has been exceeded?

LimitException. If a namespace has been defined, it's included in the error message

What exception is thrown in Apex if there is an attempt to access a list index that's out of bounds?

ListException

What is the <apex:include> tag used for in Visualforce?

Loading a full VF page's content into another page

Can other annotations be used along with @InvocableMethod?

No

A queueable method is created using

the Queueable interface

What should be selected when creating an invocable process to signify that it's invocable?

"It's invoked by another process" under the picklist labeled "The process starts when"

What global value provider can be used to check for global values associated with the current user's device and browser?

$Browser

Which $Browser attribute should be used to determine the device type of the current user?

$Browser.formFactor

How can the general form factor of a device be determined in a Lightning component?

$Browser.formFactor, which can take on the values - DESKTOP - PHONE - TABLET

What VF global variable can be used to reference the DOM ID of a component from js?

$Component

What are some considerations for using the Continuation class?

- "continuation" can also refer to an asynchronous callout initiated by a Continuation class - Continuation isn't subject to the limit of 10 concurrent long-running requests - Mock responses are required for testing since these are asynchronous callouts - There are continuation-specific limits while a continuation is executing, but these are reset after the continuation has returned and completed the execution path - 3 asynchronous callouts are possible within a single continuation using Continuation.addHttpRequest() - Up to 3 asynchronous callouts can be chained, so the next in the chain is only executed after the previous has completed or depending on the response - Making asynchronous calls from a WSDL-generated class is similar to the process for the HttpRequest class

How can an Aura component check if it is being viewed on a phone or tablet?

- $Browser.isPhone - $Browser.isTablet - $Browser.formFactor

What are some boolean attributes that provide information about a user's mobile devices in a Lightning component?

- $Browser.isPhone - $Browser.isTablet - $Browser.isAndroid - $Browser.isIOS - $Browser.isIPad - $Browser.isIPhone - $Browser.isWindowsPhone - $Browser.isTablet

What limitations are placed on heap size in Salesforce?

- 6 MB for synchronous transactions - 12 MB for asynchronous transactions

What Visualforce components can accept action attributes?

- <apex:page> - <apex:commandButton> - <apex:actionSupport> - <apex:commandLink> - <apex:actionPoller> - <apex:actionFunction>

What are the annotations that can be added to exposed methods in a REST service?

- @HttpGet - @HttpPost - @HttpDelete - @HttpPut - @HttpPatch Each of these can only be used once per class.

What values can ApexPages.Severity take on?

- CONFIRM - ERROR - FATAL - INFO - WARNING These values are passed to ApexPages.Message() to indicate the message type

What data types can a SOSL query return?

- A list of lists of sObjects - an empty list for a specific sObject type where no records are returned for that type

What data types can a SOQL query return?

- A list of sObjects - An sObject - an integer (for the count method)

SOQL ORDER BY options

- ASC - DESC - NULLS FIRST - NULLS LAST

What are the SOQL aggregate functions?

- AVG() - COUNT(), COUNT(fieldName) - COUNT_DISTINCT() - MIN() - MAX() - SUM()

What properties can be used to share a record programmatically? (4)

- AccessLevel - ParentID - RowCause - UserOrGroupId

How can the progress of an Apex job be monitored? (2)

- Apex Jobs in setup - AsyncApexJob record query

What objects can be used to run Apex tests asynchronously? (2)

- ApexTestQueueItem - ApexTestResult

What are some considerations when processing large data sets using Batch Apex?

- Batch Apex can query and process up to 50 million records - cannot be used for a synchronous task

What data types are NOT supported by the Process.Plugin interface? (4)

- Blob - Collection - sObject - Time

What primitive types can be passed as parameters to an Apex method from a Lightning Web Component?

- Boolean - Date - DateTime - Decimal - Double - Integer - Long - String

How can the status of a batch Apex job be monitored?

- By querying AsyncApexJob using SOQL - Apex Jobs in Setup

What are the levels of the ApexPages.Severity enum?

- CONFIRM - ERROR - FATAL - INFO - WARNING

What scope values are available for the USING SCOPE clause?

- Delegated - Everything - Mine - MineAndMyGroups - My_Territory - My_Team_Territory - Team

What are the two ways of accessing the describe result for a field?

- Calling the getDescribe() method on a field token, e.g. Account.Name.getDescribe() - The fields member variable of an sObject token, e.g. Schema.SObjectType.Account.fields.Name

Describe custom indexes for selective SOQL queries

- Can be added by request to Salesforce Support - Not supported for some field types, including multi-select picklists, currency fields in a multi-currency org, long text fields, some formula fields, and binary fields - Not used if the query result exceeds the system-defined threshold, a negative operator is used in the filter, or the filter compares with an empty value - a query will be non-selective if it involves an indexed custom field that is empty or null

Describe the following for a REST web service: - Class - Methods - Endpoint - Integration

- Class: @RestResource - Methods: should use an appropriate HTTP annotation - Endpoint: URL mapping specified with @RestResource annotation - Integration: a WSDL file is not generated or required

Describe the following for a SOAP web service: - Class - Methods - Endpoint - Integration

- Class: global - Methods: static and webservice keywords - Endpoint: not specified in the Apex class - Integration: a WSDL file can be generated and used by a developer

What are the three UI development options in Salesforce?

- Classic Visualforce - Visualforce container - Lightning Components

What are some considerations re: controller extension security?

- Controllers and extensions run in system mode - with sharing can be used - Controllers and extensions are generally declared as public

What are some use cases for standard controllers?

- Create a Visualforce page that requires the same functionality and logic as standard Salesforce pages - Create a Visualforce page on which standard actions don't need to be customized

What are some use cases for standard set controllers?

- Create a custom list controller or extend the pre-built Visualforce list controller - Add features not supported by standard list controllers, such as custom sorting

What are the high-level steps to set up a test for a VF controller or extension?

- Create a test class and method with @isTest - Create a PageReference to the VisualForce page - Pass the PageReference variable to Test.setCurrentPage() - Instantiate the controller for the page - If an extension is needed, pass the controller variable as a parameter to the extension constructor to instantiate

What are some considerations re: getter and setter methods in controller extensions?

- DML can't be used in getter methods - Getter and setter methods can't be annotated with @future - The order of methods and variables being processed is not guaranteed - If the value of a variable that is set by another method is needed, the method can be called directly to ensure the variable of interest has been set

What are some considerations re: using DML statements in controller extensions?

- DML statements can't be used in getter methods - DML statements can't be used in constructor methods

What errors can arise from parallel test execution?

- Data contention issues - UNABLE_TO_LOCK_ROW

What are some use cases for standard list controllers?

- Display a list of records - Display list view filters on a Visualforce page - Create a Visualforce page with pagination features

Describe Enhanced External Services

- Enabled by default - Capable of handling OpenAPI 2.0 schema - Supports nested object types as inputs or outputs - Can send parameters as headers within HTTP requests - Not subject to Apex word and character limitations - Actions generated by the service schema will appear under External Service Actions in Flow Builder

What are some best practices and considerations for scheduled Apex?

- Execution may be delayed based on service availability - Governor limits are a concern if a class is scheduled from a trigger - All additional processing must take place in a separate class outside the execute method - Synchronous web service callouts are not supported from scheduled Apex - If an Apex job is scheduled to run during a maintenance window, it will be rescheduled to run after service is back up

What components of the developer console can be used to analyze server-side performance?

- Execution overview panel (Timeline) - Stack Tree Panel (Performance Tree and Execution Tree) - Execution Stack

What are some advantages to using standard list controllers in VF? (3)

- Existing list view filters can be applied: {! listviewOptions}, {! filterId} - pagination: Next, Previous, First, Last actions - a dynamic number of records can be rendered {!PageSize} Dynamic sorting is not available through standard list controllers

What are some use cases for controller extensions?

- Extend or override a standard action - Add a custom button to a page - Build a page that respects user permissions

What are some setup objects that will lead to a mixed DML error when operations are done on the setup objects and other objects in a transaction?

- FieldPermissions - ObjectPermissions - PermissionSet - Territory2 - QueueSObject

What two techniques can be used to track DML statements for debugging purposes?

- Filter in the Execution Log panel - Only enable DML in the Executed Units tab of the Execution Overview panel

What are the four types of asynchronous Apex?

- Future methods - Queueable Apex - Batch Apex - Scheduled Apex

Describe the Query Plan tool

- Help -> Preferences in the Developer Console - Used by clicking the 'Query Plan' button in the 'Query Editor' tab - Lists the cost of the query, whether it will do a TableScan, and whether it's possible to use an index - Queries should be designed to not use a TableScan

REST callouts are made with a combination of these classes (3)

- Http - HttpRequest - HttpResponse

List some fields that are indexed by default

- Id - Name - OwnerId - CreatedDate - SystemModStamp - RecordType - custom fields marked as External ID or unique - lookup fields - master-detail relationship fields

What are some best practices and considerations for future methods?

- If there are more than 2,000 unprocessed asynchronous requests in the queue from an org, additional requests are delayed while the queue handles requests from other orgs - Future methods should be executed as quickly as possible, by minimizing web callout times and tuning queries - Batch Apex should be used for processing large numbers of records - Future methods should be tested at scale

What are some use cases for custom controllers?

- Implement total custom logic - Create a page that uses a web service or HTTP callout - Build a page that runs entirely in system mode - Create a page with new actions - Customize user navigation

What is true about a controller extension that includes a web service method?

- It must be defined as global - Initial web service access is determined by the user's profile, but web services run in system mode

What pieces of information can be viewed in the Performance Tree but not the Execution tree in the dev console's Stack Tree?

- Iterations - Duration percentage - Heap percentage

SOQL alphanumeric comparison operators

- LIKE - IN - NOT IN - INCLUDES - EXCLUDES

What values does the type attribute of the supportedFormFactor subtag (of supportedFormFactors) support?

- Large (for desktop devices) - Small (for phones)

What are the only objects that can be merged using a DML operation?

- Leads - Contacts - Accounts

Email-to-Salesforce can relate emails to (4)

- Leads - Contacts - Opportunities - Other specific Salesforce records

What can be used to allow users to initiate a SOAP or REST callout?

- Lightning component - Visualforce page - a custom button Also, an apex trigger invoked from SF data changes can perform a callout

What collection types can be passed as parameters to an Apex method from a Lightning Web Component?

- List - Map - Set - type[]

What field types can't be used in a SOQL ORDER BY clause?

- Multi-select picklist - Rich text area - Long text area - Encrypted - Data category group

What must be done to make sure a recalculation class is called for an objects Apex managed sharing rules? (2)

- Must implement Database.Batchable - Must be associated with the object in the object's Apex Sharing Recalculations section

A developer has created a custom Lightning component, but the component isn't showing up in Lightning App Builder. Why is this happening?

- My Domain has not been defined - My Domain has not been deployed to the org

A developer is creating a custom Visualforce component and wants to give it a custom attribute. What attributes must be added to the custom attribute definition?

- Name - Type - Description

What are some considerations re: person accounts vs. business accounts in the context of controller extensions?

- Name fields behave differently for person accounts and business accounts - The workaround for this is to create a formula field that will render the name properly for both person and business accounts

To make a successful callout to an external site, one of these must first be configured (2)

- Named Credential - Remote Site Setting

What components are required to use an external service?

- Named credential, a URL, and authentication settings - A schema URL path (or endpoint) or a complete schema - A flow that uses the Apex actions generated from the External Services registration

What tabs does the Stack Tree Panel in the developer console contain?

- Performance Tree: Provides a top-down view that shows the amount of time a specific section of code took to execute, groups repeated statements into a single total, and shows number of iterations - Execution Tree: Provides a top-down view that shows the amount of time a specific section of code took to execute; it shows each iteration of a repeated statement in a separate line

What are some considerations re: passing data to/from controller extensions?

- Primitive data types like Strings and Integers are passed by value - Non-primitive types like Lists and sObjects are passed by reference

How can the status of a queued job be monitored?

- Querying AsyncApexJob using SOQL - Apex Jobs in Setup

What are some best practices and considerations for queueable Apex?

- Queued jobs count against the shared limit for asynchronous Apex method executions - Up to 50 jobs can be added using System.enqueueJob() in a single transaction - Only one child job can exist for each parent queueable job - There is no limit on the depth of chained jobs

In what ways is it communicated that an uncaught exception occurred?

- Salesforce sends an email to the developer when an exception is not caught by Apex code - An error message appears in the Salesforce UI - Exceptions are logged in debug logs

What can help ensure that the Force.com Query Optimizer produces the best performance?

- Separate queries instead of complex AND/OR conditions - Avoid using LIKE with a leading % wildcard (does not use an index) - Avoid using a text field with comparison operators <, >, <=, >= (not indexed) - Non-deterministic formula fields using e.g., TODAY() and NOW(), cannot be indexed

What are some best practices and considerations for using batch Apex?

- Should only be used if there are more than a batch of records to be processed - SOQL queries should be tuned for speed - The number of asynchronous requests should be minimized to prevent delays - A trigger that invokes a batch job must not add more batch jobs than the limit

What are the attributes of the LayoutItem component?

- Size: 1-12 - smallDeviceSize: 1-12 - mediumDeviceSize: 1-12 - largeDeviceSize: 1-12 - Flexibility - alignmentBump: can push Layout items left or right - Padding

What classes are available for JSON support in Apex?

- System.JSON - System.JSONGenerator - System.JSONParser

How is a queueable method scheduled and what does it return?

- System.enqueueJob() submits the job - An AsyncApexJob record Id is returned

What are the two ways of accessing the token for an sObject?

- The sObjectType member variable, e.g. Account.sObjectType - The getSObjectType() method on an sObject describe result, sObject variable, a list, or a map

What are some considerations when using the force:LightningQuickActionWithoutHeader interface?

- The user interface can be completely controlled - A complete UI for the action is expected

How can StandardSetController be used?

- To create a list controller - To extend the pre-built Visualforce list controller

What are some characteristics of classic Visualforce?

- UI generated by the server - VF page uses an Apex standard or custom controller and optional extensions - Workflow includes: 1. User requests VF page 2. Server processes underlying VF code 3. Server sends result back as HTML 4. Upon another user-submitted request, the process is repeated

What are some characteristics of Lightning Components?

- UI generated client-side using js - Lightning Data Service and Apex - Workflow includes 1. User requests app or component, which comes in a bundle 2. js generates UI 3. js handles UI interaction

What are some characteristics of Visualforce as a JavaScript application container?

- UI mostly generated client-side using js - Uses Remote Objects or js Remoting with Apex - Workflow includes: 1. User requests VF page 2. Server returns "empty" VF page containing a js application 3. js application generates UI after loading in browser 4. js handles UI interactions

How can sorting be used to improve query performance?

- Use ORDER BY on an indexed field - If ORDER BY and LIMIT are both used, the Force.com Query Optimizer could use the index - Sort by number or date fields, preferably

An organization uses a combination of Person and Business Accounts. A developer needs to create a custom controller for the Account object. What considerations should he keep in mind when designing his solution?

- Use a custom name formula field - The type of account created depends on which name field is used in the insert statement - When referencing the Name field using <apex:inputField>, you must reference IsPersonAccount in your query

What are some general best practices for improving VF performances?

- VF pages should be designed around specific tasks - Standard objects and declarative features should be used where possible - the with sharing keyword can reduce the number of records accessed - lazy loading via JS remoting, the reRender attribute and custom components - offload expensive secondary processing to asynchronous tasks - custom settings/metadata

What does GROUPING(fieldname) do in a SOQL query?

- determines whether a row is a subtotal or field when GROUP BY ROLLUP or GROUP BY CUBE is used - returns one if the row is a subtotal for the field, and 0 otherwise

SOQL date literals

- YESTERDAY - NEXT_WEEK - LAST_90_DAYS - NEXT_N_MONTHS

When WSDL2Apex is used to generate a stub class, each complex type becomes ______ and each element is a ______ in it

- a class - a public field

A flow can be accessed in an Aura component via (3)

- a custom action - a Lightning tab - a Lightning page

What code elements are required for javascript remoting? (VF)

- a javascript method that calls Visualforce.remoting.Manager.invokeAction() - an apex method with the @remoteAction annotation

What is the $ContentAsset global value provider to reference?

- images - CSS - js

What conditions must be met for a user to run a flow in a Visualforce page?

- access to the page - either the 'Run Flows' permission or the 'Force.com Flow User' field enabled on the user detail page

A platform event can be created using

- an Apex trigger - a process - a Lightning component

An Apex action is defined by (2)

- an action name - an Apex class

A REST web service uses ______, while a SOAP webservice uses the ______ keyword

- annotations - webservice

What are some major content types are supported as static resources?

- archives (zip, jar) - images (jpg, png, svg, etc.) - style sheets - js - csv - audio (mp3/wav)

How and when do future methods run?

- asynchronously - in their own thread, in the background - they do not start until resources are available

What are some best practices for multiple concurrent requests?

- avoid resource-intensive operations in action methods called by <apex:actionPoller> - The time interval for calling Apex from the VF page should be increased - non-essential logic should be moved to an asynchronous code block

An action method in a VF controller must:

- be public - accept no arguments - return PageReference or null

What must be added to annotations in Apex when implementing a Continuation class?

- cacheable=true on all methods involved in the continuation chain - continuation=true on the action method that returns the continuation instance

What are some best practices for reducing load times?

- caching icons, etc. - pagination - lazy-loading Apex requests - js should be moved to the bottom of the page if feasible - VF pages must be under 15 MB

Possible use cases for future methods (2)

- callouts to web services - separating DML operations to prevent mixed DML errors

What does the start() method of a batch Apex class do, and what does it return?

- collects the records or objects to be passed to execute() - returns either Database.QueryLocator or Iterable

An external service can be used to

- connect to an external system - invoke methods based on the external source via a flow - import data from the system into salesforce

An Apex trigger can publish a platform event message by

- creating an instance of the platform event - passing the instance to EventBus.publish()

An Apex class can be exposed as a SOAP web service by

- defining the class as global - adding the webservice keyword and static definition modifier to each method

The $ContentAsset global value provider is used for referencing (3)

- images - stylesheets - javascript files

What are some best practices for reducing heap size?

- diagnose issues using debug logs - Limits.getHeapSize(), Limits.getLimitHeapSize() - SOQL for loops - removing items from a collection while iterating over it - the transient keyword - class-level variables shouldn't be used to store large amounts of data - use scope judiciously, so methods and loops go out of scope

What does a Continuation class do?

- enables users to make long-running requests from a Visualforce page or Lightning component to an external web service - Asynchronous callouts are used. They don't count toward the Apex limit of 10 synchronous requests that last longer than 5 seconds - responses are handled through a defined callback method

When creating and sending an HTTP request, these two values cannot be blank

- endpoint - method

What does the finish() method of a batch Apex class do, and when is it called?

- executes post-processing operations, like sending an email - called after all batches are processed

A custom exception class is created by

- extending the Exception class - giving the class a name ending with 'Exception' All common Exception methods are inherited by a custom exception class

An external lookup relationship involves a parent object which is _____ and a child object which is _____

- external - standard, custom or external

A developer can customize the individual parts of a flow in Visualforce using

- flow attributes - CSS classes

Name some exception methods that only apply to DMLException errors

- getDMLFieldNames(): the fields that caused the error - GetDMLId(): the Id of the failed record that caused the error - GetDMLMessage(): the error message - getNumDML(): the number of failed records

What base wire adapters can be used to fetch 1. a list of records 2. a single record from the database?

- getListUi - getRecordUi

What are the most common exception methods?

- getMessage() - getCause() - getLineNumber() - getStackTraceString() - getTypeName()

Methods in a class annotated as @RestResource should be

- global - static

Describe the WebServiceMock interface

- global or public - @isTest annotation - the doInvoke() method must be implemented - response and other information passed to doInvoke() - response parameter is of type Map<String, Object> - best practice: a separate class should be created for each tested callout - a specific endpoint and method can be specified in the doInvoke() method

Describe the HttpCalloutMock interface

- global or public - should be annotated with @isTest - the respond() method must be implemented, which is passed an HttpRequest object and returns an HttpResponse object - HttpResponse should mimic what the REST-based web service would return - best practice: a separate class should be created for each tested callout - in respond(), the mock response can only be sent for a specific endpoint and HTTP method

What are some ways to prevent non-selective queries?

- hard delete records to keep those in the recycle bin from being considered by the Force.com Query Optimizer - Avoid LIKE with a leading % - Avoid >, <, >=, <= with text-based fields, != and NOT more generally in WHERE clauses. These all prevent the Force.com Query Optimizer from using an index - Complex AND/OR conditions should be avoided - Separate queries should be used instead of complex joins - Queries should not be filtered using non-deterministic formula fields (prevents index use) like one that references a non-indexable field

What are some considerations when using the force:LightningQuickAction interface?

- header and footer panels are generated on the modal dialog - A standard Cancel button is automatically placed in the footer channel - The content of the footer panel cannot be customized - The header title on the modal dialog is the label of the Lighting Component Action

What are the attributes of the Layout component?

- horizontalAlign - verticalAlign - pullToBoundary - multipleRows

How is a batch Apex class called?

- instantiated - Database.executeBatch() called with the instance of the class - a scope parameter can be used to specify the number of records passed into execute() for each batch

In order for an apex method to be invocable by Lightning Web Components (3)

- it must be static and either global or public - it must be annotated with @AuraEnabled, with cacheable=true if @wire will be used to call it - For Continuation implementations, continuation=true must be set on the method that returns the continuation instance

What do queueable methods offer beyond what future methods offer?

- job-chaining - non-primitive data types as parameters

What are some considerations for keeping SOSL queries selective?

- keep search terms as selective as possible - target specific objects, and where applicable records - Name, Phone, Text, and Picklist fields have search indexes

What base lightning components allow an app to work with records while avoiding Apex methods?

- lighting-record-form - lightning-record-view-form - lightning-record-edit-form

What does USING SCOPE do in a SOQL query?

- limits records returned to a specified scope

The Executed Units tab in Execution Overview in the dev console can provide info about the number of executed (8)

- methods - queries - workflows - callouts - DML statements - validations - triggers - Visualforce pages

Given a variable myVariable that is modified by a process, where can the new and old values be seen in a debug log?

- myVariable_current - myVariable_old

What parameter values can be passed to the @JsonAccess annotation?

- never - sameNamespace - samePackage (impacts only 2nd-generation packaged) - always

Which method can be used on an sObject token to create a new sObject of that type?

- newSObject() - the token must be cast into a concrete sObject type to use newSObject() e.g. (Account)token.newSObject() - can be called as newSObject(id), where id is the Id of an existing record

What arguments and return values are used by test setup methods?

- no arguments - no return values

What does the execute() method of a batch Apex class do, and what is passed to it?

- processes the data from start() - the default batch size is 200 records - batches are not guaranteed to execute in order - takes a reference to Database.BatchableContext and a list of sObjects or parameterized types

How must action methods called from a Visualforce page be defined?

- public - no arguments - return a PageReference

What are some considerations re: the reRender attribute in Visualforce?

- reRender cannot be used to update content in a table - It is not the same as the 'rendered' attribute

What records can a standard list controller retrieve aside from the one specified by the id parameter?

- related records - up to five levels of child-to-parent - one level of parent-to-child

How many records can Database.getQueryLocator be used to retrieve?

10,000

What are the render phases of a Lightning Component renderer?

- render - rerender - afterRender - unrender executed in that order

What does Schema.getGlobalDescribe() do?

- returns a map of sObject names (keys) and tokens (values) - the return data type is Map<String,Schema.SObjectType> - the map is generated dynamically at runtime, based on the sObjects currently available in the org as well as permissions

What are the two ways to get sObejct describe information?

- sObject tokens - Schema.DescribeSObjectResult[] results = Schema.describeSObjects(objectTypes), where objectTypes is a list of strings

What parameters can be passed to the @JsonAccess annotation?

- serializable - deserializable

How can a toast be displayed from Visualforce?

- sforce.one.showToast({toastParams}) - "Available for Lightning Experience, Lightning Communities, and the mobile app" must be checked - "message" is a required parameter. "title" and "type" can also be set as parameters, where "type" can be one of Success, Error, Warning or Info

How can javascript remoting reduce response time for a Visualforce page?

- stateless - can be asynchronous

Methods annotated with @InvocableMethod must be (2)

- static - public or global

What requirements must be satisfied to allow Apex methods to be invoked by Lightning Web Components?

- static and either global or public - annotated with @AuraEnabled - cacheable=true must be set to use @wire - if cacheable=true is set the method can still be called imperatively - For continuation implementations, continuation=true must be set in the @AuraEnabled annotation for the Apex method that returns the continuation instance

What does GROUP BY ROLLUP do in a SOQL query?

- subtotals are added as the last row for aggregated data in the query results - more than one field can be rolled up, e.g., GROUP BY ROLLUP(StageName, Amount) - GROUP BY and GROUP BY ROLLUP can't be used in the same SOQL statement

What does GROUP BY CUBE do in a SOQL query?

- subtotals for all combinations of grouped fields are added in the query results - up to three fields can be included in a GROUP BY CUBE clause - GROUP BY and GROUP BY CUBE can't be used together in the same SOQL statement

What does FOR VIEW do in a SOQL clause?

- the LastViewedDate fields of the returned records will be updated - the records are added to the RecentlyViewed object - the records will show up in Recent Items and the global search auto-complete

What are the two ways of accessing the describe result for an sObject?

- the getDescribe() method, e.g. Account.sObjectType.getDescribe() - the Schema sObjectType static variable, e.g. Schema.sObjectType.Account

What does FOR UPDATE do in a SOQL query?

- the returned records will be locked, and during a specified time only the locking client can change the records - other users will have read access - if the record is not unlocked in 10 seconds, a query exception will occur

Why must a schema be provided to use an external service?

- the schema provides services and methods for the flow to consume - generates the Apex actions with invocable variables corresponding to flow inputs and return values

How can view state be optimized in Visualforce?

- the transient keyword should be used for data that isn't necessary for view state or refreshes in Apex controllers - filters and pagination - <apex:actionRegion> to minimize the number of forms - don't store data that can be recreated during postback - large quantities of read-only data should be stored in custom objects or custom settings - the view state mechanism can be bypassed using an HTML form instead of apex:form

A variable defined with the final keyword can only be assigned a value once, in one of these places: (2)

- the variable declaration - inside a constructor

What does UPDATE TRACKING do in a SOQL query?

- tracks keywords used in searching Salesforce Knowledge articles

The number of event handlers used by a lightning component can be minimized by the use of

- unbound expressions - <aura:if> - limited use of application events - component events

What are some considerations when processing large data sets using a bulk API query?

- up to 15 GB can be retrieved in 1 GB chunks - query and queryAll are both supported - queryAll can return deleted records and archived Task or Even records

What does FOR REFERENCE do in a SOQL clause?

- updates the LastReferencedDate fields of the returned records - these records are added to the RecentlyViewed object - the records will show up in Recent Items and the global search auto-complete

What does UPDATE VIEWSTAT do in a SOQL query?

- updates the view statistics for a Salesforce Knowledge article

Describe the Http.send() method

- used to pass a previously-created HttpRequest instance as the request - returns a response that can be assigned to an HttpResponse variable

What is the difference between 'let' and 'var' when declaring js variables?

- var is scoped at the function level - let is scoped at the block level

How must a future method be defined?

- with the @future annotation - static and void - the parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types - sObjects cannot be passed as parameters to future methods

Outbound message actions can be associated with (3)

- workflow rules - approval processes - entitlement processes

What are some considerations for using $Resource to load static resources in Aura?

1. $Resource isn't available until the Aura Components programming model is loaded in the client 2. URLFOR() is not available, with string concatenation used instead

What properties can be specified when creating a share record?

1. AccessLevel 2. ParentID 3. RowCause 4. UserOrGroupId

How can supportedFormFactors be implemented in an Aura Component?

1. Create <design:supportedFormFactors> 2. Create <design:supportedFormFactor> as a subtag 3. Add the type attribute (Large or Small) to the supportedFormFactor subtag Example: <design:component label="Test Component"> <design:supportedFormFactors> <design:supportedFormFactor type="Small" /> </design:supportedFormFactors> </design:component>

What are the steps to use an external service in Salesforce?

1. Create the schema definition based on a REST-based API schema specification 2. Create a named credential using the URL of the callout endpoint to authenticate to the external service 3. Create a remote site setting using the same URL to authorize endpoint access 4. Register the external service using the named credential and schema definition 5. The external service imports the definitions and generates Apex actions 6. Create a flow which uses the generated Apex actions

Describe the execution flow of a Continuation in a Visualforce page

1. request initiated via button click 2. App server sends request to Continuation server 3. App server returns to the Visualforce page and waits for a response 4. The Continuation server sends the request to the external web service 5. The external web service sends a response to the Continuation server 6. The Continuation server receives the response and sends it to the App server 7. The App server receives the response and sends it to the Visualforce page 8. The callback method is invoked from the Visualforce page

StandardSetController can be used to paginate over large datasets that have up to how many records?

10,000

What is the maximum size for VF view state?

170kb

What is the maximum uploadable size for a WSDL file?

1MB

How many @future methods can be invoked from an Apex trigger?

50

How much of the layout viewport would be taken up by content inside <lightning-layout-item size="6">?

50%, since there are 12 parts

How many records can a single SOQL query retrieve?

50,000

What Visualforce component can be used to automatically refresh an element to reflect updated data on the page, and what is specified?

<apex:actionPoller> with - controller method to call - frequency of a call - id of the element to rerender <apex:actionSupport> can refresh but it requires a user action <apex:actionFunction> is used to invoke a controller method using js

Which VF component can be added to a page in order to display the status of an asynchronous request?

<apex:actionStatus startText="start text" stopText="text after completion id="id here">

A developer wants to include a Visualforce template in a Visualforce page. Which tag is used on the Visualforce page to import the template?

<apex:composition>

What tag is used to import a Visualforce template in a Visualforce page?

<apex:composition>

How would a static image resource called LetterA be loaded in a Visualforce page?

<apex:image url="{!$Resource.LetterA}" />

A developer wants a Visualforce page to call a controller method named InitializePage when the page first loads. What is the proper way to write the code on the Visualforce page?

<apex:page action='{!InitializePage}'>

What Visualforce component is used to display error messages?

<apex:pageMessages/>

The value of variables when starting a flow in Visualforce can be set using this component

<apex:param>

A flow can be invoked through a Visualforce page using this component

<flow:interview>

This component is used to to embed a flow in an Aura component

<lightning:flow>

What component in a Lightning app can be used to display a custom record edit form?

<lightning:recordeditform>

What component generates error messages in an aura component?

<ui:message>

How can an Apex method be set as storable, i.e., cacheable?

@AuraEnabled(cacheable=true) must be API version >= 44.0 instead of using setStorable() within js

What annotation is used for a method in a REST web service that will delete records?

@HttpDelete

What annotation is used for a method in a REST web service that will update fields in existing records?

@HttpPatch

What annotation must a REST class have?

@RestResource

Write an example @RestResource annotation

@RestResource(urlMapping='/Contact/*')

What annotation can be used to expose a private method to a test class?

@testVisible

Write a wire service call to a method called getContacts, that passes the recordId property in and receives a list of contacts

@wire(getContacts, {accountId: '$recordId' }) contacts;

What does a Lightning Component Action do?

A Lightning Component Action is a custom action that invokes and renders a Lightning component in a modal dialog.

Every standard controller includes

A getter method that returns the record specified by the id query string parameter in the page URL

How does queuable Apex allow for sequential processing?

A job can be started from another running job

What is a skinny table?

A table that contains frequently used fields of a corresponding source table, leading to increased performance of read-only operations since joins are avoided. Salesforce support must be contacted for skinny tables to be enabled.

What is required to deploy a change via Workbench?

A zip file containing a file named package.xml and any other dependent files

What does the callback function receive when using JavaScript Remoting?

An event object with information like status and an error message

What Apex types can be passed as parameters to an Apex method from a Lightning Web Component?

An instance of a standard or custom Apex class

What online tool allows analyzing large debug log files more easily?

Apex Timeline

What class can be used to create an error message to pass to <apex:pageMessages> in Visualforce?

ApexPages.Message

How are parameters passed to a VF controller/extension for testing?

ApexPages.currentPage().getParameters().put('paramName','paramValue');

How is the javascript controller represented? (Aura)

As a javascript object containing a map of key-value pairs where the key represents a client function and the value contains the code for the associated action

The WSDL2Apex utility automatically creates an Apex class for asynchronous callout with the prefix

Async Apex stub classes use WebServiceCallout.invoke() to call a web service

An invocable process can be invoked from a process that shares _____ with the invocable process

At least one unique ID ex: an invocable process that updates a case record with an AccountId can be invoked from a process that updates the account record's owner

In what order are init() events fired within a Lightning application?

At the innermost level first. For example, if the component hierarchy is Parent->Child->ClickMe the init() order will be ClickMe, Child, Parent

What exception should be thrown from an apex controller to display an error message in an Aura component?

AuraHandledException

A flow must be ____ in order to be invocable by a process

Autolaunched

Creating or updating records inside a flow loop should be

Avoided because of governor limits

What asynchronous Apex feature should be used for: - Processing large data voumes - Using queries with large results

Batch Apex

DML operations on setup objects can't be mixed with DML operations on other sObjects (e.g. profile and account) in the same transaction. Why?

Because some sObjects affect the user's access to records.

What scope do variables defined using let operate in?

Block scope

What sObject types can be passed as parameters to an Apex method from a Lightning Web Component?

Both standard and custom

How can a Lightning component be configured so it's available as a Lightning Component Action?

By implementing one of these interfaces: - force:LightningQuickAction - force:LightningQuickActionWithoutHeader

How can multiple controller extensions be used?

By specifying the names in a comma-separated list

To extend the functionality of a flow in the context of Visualforce

Create a custom controller

An external system can subscribe to a platform event using

CometD

What asynchronous Apex feature should be used for: - Asynchronous callouts to a SOAP or REST service - Long-running requests through a Visualforce page or Lightning component - Simultaneous requests from a large number of users

Continuation Class

In order to use custom Apex logic on a VF page with a standard controller, a _______ must be used

Controller extension. The controller extension's constructer must receive the standard controller as a parameter, which is of type ApexPages.StandardController

What object stores currency types in an org with multiple currencies?

CurrencyType

What is an Apex method not allowed to do when it's marked cacheable=true?

DML operations

In what way does a StandardSetController implementation help performance?

Data sets are stored on the server, so page state is reduced

What method can be used to obtain the number of records that a dynamic SOQL query would return?

Database.countQuery(queryString)

What object stores dated exchange rates in an org with multiple currencies?

DatedConversionRate

Deep linking

Defining links to records in external systems

What resource file is used to restrict a component by device type?

Design resource

What can be used to instantiate a StandardSetController?

Either a list of sObjects or Database.QueryLocator

What must be configured before a successful external callout can be made?

Either of - A Named Credential, which specifies the callout endpoint URL and its authentication parameters - A Remote Site Setting

What kind of annotation must an exposed REST method have?

Expected HTTP format

Changes made via the Force.com ANT migration tool can be easily audited (T/F)

False

Code annotated with @isTest is counted toward the org's code size limit (T/F)

False

Components can be deleted or renamed via a change set (T/F)

False

Dynamic sorting is available through standard list controllers (T/F)

False

It is possible to configure creation of records in Email Deliverability settings (T/F)

False

It is possible to directly edit Apex code in production (T/F)

False

Standard Visualforce controllers can't be used to pass data to a flow (T/F)

False

The COUNT() and SUM() aggregate SOQL methods can be used on checkbox fields (T/F)

False

When a process invokes another process, the new process is considered a new transaction in terms of DML limits (T/F)

False

When multiple criteria-based processes exist for the same object, it is possible to guarantee which process starts first (T/F)

False

Workflows and Process Builder are supported for external objects (T/F)

False

reRender can be used to update the content of a table in Visualforce (T/F)

False

Custom metadata and custom settings can be included in a package (T/F)

False. Custom metadata can be, but custom settings can't be.

All fields in a Lightning Web Component are reactive, i.e., if a displayed field is changed then the component rerenders

False. If a field is an object or array, the @track decorator must be used in order for the field to be reactive

Apex Managed Sharing uses Share Objects, which can be accessed from Process Builder or Workflows (T/F)

False. Neither can access Share Objects.

The force:lightningQuickActionWithoutHeader interface is supported by Aura and Lightning Web Components (T/F)

False. Only Aura supports this interface.

An outbound message uses a REST API (T/F)

False. Outbound messages use SOAP APIs

Full access to a record can be granted to a user with Apex Sharing (T/F)

False. The most permissive level of access granted will be used, but full access cannot be granted.

Apex classes that implement Process.Plugin are available in flows and Process Builder. (T/F)

False. They are not available in Process Builder.

REST and SOAP callouts to externally hosted web services can only be initiated asynchronously (T/F)

False. They can be initiated either synchronously or asynchronously

Bind variable fields can be used in both inline and dynamic (Database.query()) SOQL queries (T/F)

False. They can't be used in dynamic SOQL queries.

For an Apex method to be callable imperatively from an LWC, it must be annotated with @AuraEnabled(cacheable=true)

False. cacheable=true is not necessary

@AuraEnabled(cacheable=true) is required to call an apex method imperatively from a LWC (T/F)

False. cacheable=true is only required if the wire service is used

Which deployment tool allows scheduling deployment?

Force.com ANT migration tool

Which scripted deployment tool forces an interactive login?

Force.com CLI

What asynchronous Apex feature should be used for: - External web service callouts - Resource-intensive operations - Isolating DML operations

Future methods

_____________ allow for the creation of an organization-wide default value that can be overridden for specific profiles or users.

Hierarchy custom settings

When are test setup methods not supported?

In a test class that uses the @isTest(SeeAllData=True) annotation

How is view state stored in a VF page?

In an encrypted, hidden form field

In what order are the object lists returned by a SOSL query?

In the same order as in the query

A platform event message is delivered in this format

JSON

What class can be used to construct JSON-encoded content element-by-element?

JSONGenerator

This class contains methods which can be used to parse JSON-encoded content

JSONParser Ex: JSONParser parser = JSON.createParser(response.getBody()); while(parser.nextToken() != null) { System.debug(parser.getText()); }

A developer is designing a VF page that will perform business logic on related records and then update them using js. What is the best solution?

Javascript Remoting

Which of javascript remoting and remote objects is more suitable for complex applications, and why?

Javascript remoting, because it supports custom server-side logic and performs better in high-traffic environments.

What can be done to make a text, auto-number or email field sidebar-searchable?

Make the field an External ID field

Which Apex interface can be implemented to process incoming email messages?

Messaging.InboundEmailHandler

Which interface should an Apex class implement for handling inbound emails?

Messaging.InboundEmailHandler

How is NEXT_N_QUARTERS used in a SOQL query?

NEXT_N_QUARTERS:n where n is the number of quarters

What arguments can a controller extension take?

One of - ApexPages.StandardController - The name of a custom controller

Where can platform events be defined, and how can they be published?

Platform events can be created in Setup. They can be published using: - Apex - Process Builder - Flow Builder

What can the next(), previous(), last(), and hasNext() methods of StandardSetController be used to implement?

Pagination

Which feature can be used to secure inbound and outbound integrations between Salesforce and AWS Virtual Cloud (VPC)?

Private Connect

Where can minimum test coverage percentage be set for flows?

Process Automation Settings

A flow can be invoked by a process created in

Process Builder

To invoke an invocable process via another process, the action type should be

Processes

What are some pros/cons of Visualforce as a js application container?

Pros: - Highly interactive Cons: - Complexity - No built-in metadata integration, and requires a custom controller - Not explicitly supported by the dev console

What are some pros/cons of Lightning Components?

Pros: - highly interactive - aligns with Salesforce's UI strategy - builds on metadata from the foundation, which speeds up development time Cons: - steeper learning curve than VF - some features and standard components aren't supported yet

What are some pros/cons of classic Visualforce?

Pros: - trustworthy and well-established - easy to implement - large applications are split into small, manageable pages - Working with standard controllers is easy Cons: - Limited interactivity; custom js required for added functionality - High latency, with poor mobile performance

Test data factory classes are generally

Public

What object must be created to subscribe to a specific event of interest in the context of the Streaming API?

PushTopic. Each PushTopic corresponds to a channel in CometD.

What does the TYPEOF clause do in a SOQL query?

Queries data containing polymorphic relationships. For example, the What field on the Event object can contain a reference to an Account or an Opportunity: SELECT TYPEOF What WHEN Account THEN Phone, NumberOfEmployees WHEN Opportunity THEN Amount, CloseDate ELSE Name, Email END FROM Event

What asynchronous Apex feature should be used for: - Using sObjects as parameters - Monitoring job progress by ID - Sequential Apex processing

Queueable Apex

This class contains methods and properties that can be used with Apex REST

RestContext

What should be used if a SOQL query is expected to return more than 50,000 records in an Apex trigger?

SOQL for loop

What exception is thrown in Apex if there is an attempt to access a field on an sObject which is not available?

SObjectException

What can be set up to allow SF users to search, view and modify data stored in an external system without leaving Salesforce?

Salesforce Connect

Which tools allow analyzing Lightning pages and components for performance issues?

Salesforce Lightning Inspector

What is the preferred method to include js on VF pages?

Save it as a static resource and reference it via <apex:includeScript>

What asynchronous Apex feature should be used for: - Running Apex code on a schedule

Scheduled Apex

What method is used to obtain detailed information about the tabs of an app?

Schema.DescribeTabSetResult.getTabs()

What method is used to obtain metadata information about apps and their tabs?

Schema.describeTabs() returns a list of Schema.DescribeTabSetResult objects that describe standard and custom apps

What method is used to create a dynamic SOSL query?

Search.query()

How can Akamai CDN delivery be enabled?

Session Settings -> Enable Content Delivery Network (CDN) for Lightning Component framework - changes source domain of files - doesn't distribute an org's data or metadata

How can a text, auto-number or email field be made side-bar searchable?

Set the field as an external ID

Invocable methods can be categorized in Flow Builder by

Setting the category parameter: @InvocableMethod(category='categoryName')

Where is the only place Visualforce template descriptions can be referenced?

Setup

In order to add a VF page to an object's page layouts, its _____ controller must be used

Standard

This class contains methods for serializing Apex objects and deserializing JSON content

System.JSON

This class contains methods for serializing objects into JSON content using the standard JSON encoding

System.JSONGenerator

This class contains methods for parsing JSON-encoded content

System.JSONParser

What method is used to execute scheduled Apex?

System.schedule() A class can also be scheduled from Apex Classes in Setup

A test class for a custom controller or extension cannot be named

Test this generates the following error: Method does not exist or incorrect signature: Test.setCurrentPage(System.PageReference)

What method is used to load data from a static resource?

Test.loadData (.csv format)

Example Test.setMock() call

Test.setMock(WebServiceMock.class, new MockWebService()) where MockWebService() is an implementation of WebServiceMock.class

WSDL2Apex is also known as...

The "Generate from WSDL" button under Setup > Develop > Apex Classes.

What happens when a @RemoteAction method throws an exception?

The Apex stack trace provided by the event object can be used in error handling of the callback function

What namespace can be used to access Chatter functionality in Apex?

The ConnectApi namespace. This is also referred to as Connect in Apex

How can Lightning page performance by browser be viewed?

The Lightning Usage app, with the following sections: - Browser - Page

A developer has created code which will return a query locator containing 11,000 records. What will happen if he instantiates a StandardSetController using this query locator?

The StandardSetController will not be instantiated and an exception will be thrown. If a list of sObjects had been used instead of a query locator, it would have been truncated and no exception would be thrown.

What can be used to generate an Apex class from a WSDL file?

The WSDL2Apex utility

What must be done for a Lightning Component Action to be packaged?

The access attribute of the target Lightning component must be set to global (access=global)

What does a standard set controller allow?

The creation of a custom list controller

If a bulk DML call originates from DML statements in Apex and at least one of the records fails

The entire transaction is rolled back

When multiple controller extensions are used, which extension defines overrides?

The first in the list

How is the prototype used by StandardSetController accessed?

The getRecord() method

How is a batch class executed?

The job is placed in the Apex job queue and executed as a discrete transaction

What happens when a user rolls back to a savepoint that is not the last savepoint?

The later savepoint variables become invalid

What happens if a StandardSetController implementation is instantiated with a list of sObjects returning more than 10,000 records?

The list is truncated to 10,000

Which method of a Continuation class requires the continuation=true annotation?

The method that returns a Continuation instance

What determines how errors that occur due to a bulk DML call are handled?

The origin of the call

If a bulk DML call originates from the SOAP API with default settings and at least one of the records fails

The runtime engine attempts a partial save

A developer has created a list of 11,000 records. What will happen if the developer instantiates a standard set controller using this list?

The set will be instantiated but the record list will be truncated

A controller extension's constructor must recieve this as a parameter

The standard controller, which is of the type ApexPages.StandardController

What limitations exist for synchronous requests from Apex?

There can be a maximum of 10 synchronous requests that last longer than 5 seconds at once

What is the best practice for error messages generated by server-side code in Lightning?

Throw System.AuraHandledException from the server-side controller

Which tab in the dev console's Execution Overview shows a graphical representation of how much time certain events took?

Timeline

Which API allows retrieving debug logs via SOAP or REST callouts?

Tooling

A continuation can be used in the Apex controller of a VF page or Lightning component (T/F)

True

A flow can be added to a custom Aura component (T/F)

True

A test data .csv needs to have column headers (T/F)

True

A unique external ID field on a parent object can be used to insert/update records of a child object if there is a lookup relationship between the two (T/F)

True

Calls to an external system can be performed from a batch Apex job (T/F)

True

Every batch Apex transaction starts with a new set of governor limits (T/F)

True

Exceptions in a custom controller or controller extension for a Visualforce page can be handled (T/F)

True

Force.com ANT migration tool is a command-line tool (T/F)

True

Invocable methods and invocable variables support generic sObject and List data types (T/F)

True

Lightning Data Service only operates on one record at a time (T/F)

True

List<sObject> can store the results of a SOQL query (T/F)

True

Methods in a test utility class can take parameters and return a value (T/F)

True

Soft-deleted rows can affect SOQL query performance (T/F)

True

StandardSetController uses a prototype object to store the list of field updates which should be applied to the list of user-selected records (T/F)

True

Users can pause and resume flow interviews from a Visualforce page (T/F)

True

Multiple short bursts of Apex events should be analyzed when trying to improve the performance of an Apex class that makes callouts to external web services and performs DML operations (T/F)

True This is generally an indication of inefficient Apex loop logic

A SOQL query always returns data as complete records (T/F)

True, but only the fields in the query are returned

How can a file inside an archive static resource be accessed in Visualforce?

URLFOR(), e.g. <apex:image url="{!URLFOR($Resource.Letters,'/letter-B.png')}" />

A developer wants to create 10 Visualforce pages that will all have the same structure and much of the same text, but need specific sections of a page to differ slightly. How can this be done?

Use a template to define the common structure for the pages and use <apex:insert> tags to identify areas of different content

How can form factor support be implemented in a Lightning Component?

Using supportedFormFactors tags

How is a batch Apex class implemented?

Using the Database.Batchable interface, which lays out these methods: - start() - execute() - finish()

How is a custom controller invoked in a Visualforce page?

Using the controller attribute of <apex:page>

How is a standard set controller invoked in a Visualforce page?

Using the controller attribute of <apex:page>

How can a button click be simulated when testing a VF controller/extension?

Using the controller's action methods

How can user input be simulated when testing a VF controller/extension?

Using the controller's setter methods

How is a controller extension invoked in a Visualforce page?

Using the extensions attribute of <apex:page>

How is a standard list controller invoked in a Visualforce page?

Using the standardController and recordSetVar attributes of <apex:page>

How are standard controllers invoked in a Visualforce page?

Using the standardController attribute of <apex:page>

Should cacheable=true be added to the annotations for methods involved in a continuation?

Yes. It is not necessary, but will improve performance.

After a schedulable class is scheduled

a CronTrigger object is created

The rendered attribute in Visualforce accepts

a boolean value which determines whether a section of the page should be rendered at all

An indirect lookup relationship involves

a child external object linked to a parent standard or custom object

Th reRender attribute in Visualforce must reference

a named section of the page. The id attribute can be used to identify the section of the table.

When WSDL2Apex is used to generate a stub class, each WSDL operation is mapped to

a public method in the Apex class

CometD is

a scalable HTTP-based event routing bus that implements the Bayeux protocol

The OFFSET keyword in a SOQL query specifies

a starting row offset in the result set. Note that OFFSET 1 will return results starting from the first row

What event is fired when Lightning component rendering is complete?

afterRender

If the list of fields in a SELECT clause includes an aggregate function, then

all non-aggregated fields must be included in the GROUP BY clause

Describe long polling

allows an external system to connect and request information from Salesforce. If information is not available, Salesforce holds the request and waits until it is available, i.e. an event of the right type occurs

A platform event is similar to

an sObject

This component can be used to add a report chart to a Visualforce page

analytics:reportChart

HttpRequest.setBody() specifies

body content for an HttpRequest instance

How can an external service be registered?

by navigating to External Services in Setup

If the Salesforce query optimizer recognizes that an index can improve performance for frequently run queries it

can automatically index fields which aren't indexed by default

A selective SOQL query

contains a query filter on an indexed field for a custom index, the threshold is - 10% of the first million records - 5% thereafter up to 333,333 records maximum for an indexed standard field, the threshold is - 30% of the first million records - 15% thereafter

What must be added to the annotation of a method that returns a continuation instance?

continuation=true

This SOQL function will convert a currency field to the user's currency

convertCurrency()

This method in the JSON class returns a parser

createParser()

What is a content asset file used for?

custom apps and community templates

What would be the name of the history object for customObject__c?

customObject__history

What Metadata API calls can be used to move customization information from a sandbox to a production organization?

deploy() retrieve()

Apex code can be invoked from Visual Workflow by adding (2)

either of - a Call Apex flow element - an Apex plugin that uses the Process.Plugin interface

Lazy loading can be implemented for a lighting datatable using this attribute

enable-infinite-loading the onloadmore attribute can be used to specify an event handler

ORDER BY should be used in testing as a best practice to

ensure that records are returned in the expected order

What methods does the Schedulable interface contain?

execute(SchedulableContext context)

If the child object in an external relationship is an external object, the values of the relationship field are determined by the

external column name

This attribute of <flow:interview> can be used to specify a URL where the user will be redirected after finishing the flow

finishLocation e.g., <flow:interview name="flowName" finishLocation="{!URLFOR('home/home.jsp')}>

What StandardListController methods return the first and last pages of records?

first(), last()

What SOQL function will convert dates, times and currencies to those matching the user's locale?

format()

What method can be used to determine whether a query locator or list of sObjects will exceed the processing limit for a StandardSetController implementation?

getCompleteResult()

What StandardListController methods return whether there are more records before or after the current page set?

getHasPrevious() and getHasNext()

What method can be used to return a map of all field names (keys) and field tokens (values) for an sObject?

getMap()

Write an example of an apex method called getNewestAccount() being called from a javascript method called getNewbie() (imperative in LWC)

getNewbie() { getNewestAccount() .then(result => { this.account = result; }) .catch(error => { this.error = error; }); }

What StandardListController method returns the page number associated with the current page set?

getPageNumber()

What StandardSetController method returns the list of updates to be applied to the selected records?

getRecord()

What StandardSetController method returns the list of sObjects in the current page set?

getRecords()

What is the difference between getRecord() and getRecords() in a Visualforce standard set controller?

getRecords() returns all records on the page

What StandardSetController method returns the list of records the user has selected?

getSelected()

What method is used to return the Id of a CronTrigger API object?

getTriggerId

Classes containing web services must be defined as

global

What access modifier must be used for classes exposing REST or SOAP services?

global

HttpRequest.setHeader() specifies

header content for an HttpRequest instance

Where can .auradoc info be accessed?

https://<myDomain>.lightning.force.com/componentReference/suite.app

To use the Apex Scheduler, a class must

implement the Schedulable interface

A custom email handler can be defined by creating an Apex class that

implements the Messaging.InboundEmailHandler interface. The class can be associated with an email service.

The general syntax to import an apex method is

import {MyClientMethod} from '@salesforce/apex/{MyNameSpace}.{MyApexClass}.{MyServerMethod}';

When using a WSDL2Apex generated stub class for callouts, the name of the Remote Site or Named credential is passed as

infoArray[0] - the first element in the fourth argument to WebserviceCallout.invoke()

What event is fired when a Lightning component initialization is complete?

init

A process can be invoked by another process using an

invocable process

If a callout from an Apex trigger or after a DML statement is executed synchronously

it can hold the database connection open

If no form factor support is defined for a Lightning component,

it will default to supporting the form factors of the Lighting page type it's assigned to: - App pages support Large and Small - Record and home pages only support Large

What interface must a Lightning component implement in order to override a standard button or link?

lightning:actionOverride

Which Lightning Web Component attribute and value are required to enable a Layout item to occupy half of the available horizontal space when a device type is larger than a tablet?

medium-device-size=6

An outbound message can be configured by

navigating to Outbound Messages in Setup

What actions can be used to add pagination to a Visualforce page using a standard list controller?

next and previous

What StandardSetController methods navigate to the next/previous page?

next(), previous()

How many invocable methods can there be in a class, and how many input parameters can an invocable method take?

one, one

This flow attribute can be used to receive values from a flow's output variables in an Aura component

onstatuschange e.g., <lightning:flow aura:id="myEmbeddedFlow" onstatuschange="{!c.handleStatusChange}">

Which module is required in order to use the loadStyle and loadScript methods?

platformResourceLoader

This attribute of <apex:commandButton> or <apex:commandLink> is used to reference a named section of a Visualforce page that should be rerendered

reRender

What event is fired at the start of Lightning component rendering?

render

What attribute is required to implement a modal dialog box in an Aura component?

role="dialog"

What StandardSetController method inserts new records or updates existing records?

save()

What StandardSetController method sets how many records should appear on each page?

setPageSize()

How is Test.setMock used?

sets the mock callout and receives the fake response when implementing HttpCalloutMock ex: HttpResponse result = Test.setMock(HttpCalloutMock.class, new MockCallout()); where MockCallout is an instance of an implementation of HttpCalloutMock

A specific section of a Visualforce page can be refreshed by

specifying the section inside an <apex:commandButton> or <apex:commandLink> component

A flow can be invoked from Apex using this method of the Interview class

start()

What method can be used by the javascript controller of an Aura component to start a flow?

startFlow()

WSDL2Apex generates Apex classes with

stub and type classes for both synchronous and asynchronous callouts

Callouts to SOAP services are handled by

the WSDL2Apex utility

HttpResponse.getBody() returns

the body returned in an HTTP response

The WSDL file for an Apex class exposed as a SOAP web service is generated from

the class detail page, accessed from the Apex Classes page in setup

This attribute can be used to override the styling of a page that uses a standard controller

tabStyle

If the Apex class associated with an Apex action in a process is modified by adding a standard field reference

the Apex action needs to be added again

HttpRequest.setEndPoint() specifies

the endpoint of an HttpRequest instance

In order to add a Visualforce page to an object's page layouts,

the object's standard controller must be used

Input variables can be passed to a flow called by startFlow() in an Aura component via

the second parameter of startFlow() e.g., flow.startFlow("myFlow", input);

What can be used to store an action at the client side in a lighting component?

the setStorable() method, e.g. var action = component.get("c.componentName"); action.setStorable(); action.setCallback(this, (response) => stuff); $A.enqueueAction(action);

HttpResponse.getStatus() returns

the status message returned in an HTTP response

HttpRequest.setTimeout() specifies

the timeout in ms for an HttpRequest instance

HttpRequest.setMethod() specifies

the type of method (e.g. GET, POST, PUT, DELETE, HEAD or TRACE) used by an HttpRequest instance

HttpResponse.getStatusCode() returns

the value of the status code returned in an HTTP response

What component can be used to handle and display recoverable errors in a Lightning Component bundle?

ui:message

What is the full DML upsert syntax

upsert records fieldsForMatchingRecords

An Apex class can be exposed as a REST web service by

using the @RestResource annotation and defining the class as global. Its methods should be global and static.

Apex classes can be run at a specified time by

using the Apex Scheduler

How can a redirect target page name be accessed when testing a VF controller/extension?

using the getUrl() method of the PageReference variable from the redirect

How would a flow component called myEmbeddedFlow be referenced and its corresponding flow, myFlow, be invoked in an Aura component?

var flow = component.find("myEmbeddedFlow"); flow.startFlow("myFlow", input);

what keywords must be used for an exposed SOAP method?

webservice static

What expression can be used to get a list of list view filters available in a Visualforce page using a standard list controller?

{! listViewOptions}

What is the correct syntax to pass a reference to a Visualforce element with an id of 'elementToTest' to javascript?

{!$Component.elementToTest}


Ensembles d'études connexes

Genetics Ch. 1-5 HW/Quiz Questions

View Set

sensation & perception ap classroom review

View Set

Chapter 20: The Conservative Order and the Challenges of Reform

View Set

PrepU Videbeck Ch 17 Mood Disorders & Suicide

View Set

Corporate Ethics and Responsibility chapter 8

View Set