Dev 1 / 16-3

Dev 1 / 16-3

1st Grade

12 Qs

quiz-placeholder

Similar activities

These are a few of our favorite things....

These are a few of our favorite things....

1st - 5th Grade

9 Qs

Internalisasi DBHCHT

Internalisasi DBHCHT

1st Grade

10 Qs

Fundamentals of law

Fundamentals of law

1st - 12th Grade

12 Qs

Dev 1 (26 en adelante)

Dev 1 (26 en adelante)

1st Grade

12 Qs

Lean Production Basics

Lean Production Basics

1st - 10th Grade

12 Qs

MAS_modulos Ana

MAS_modulos Ana

1st Grade

10 Qs

Welcome to Komori

Welcome to Komori

1st - 3rd Grade

13 Qs

Service Process Uniqlo

Service Process Uniqlo

1st - 5th Grade

10 Qs

Dev 1 / 16-3

Dev 1 / 16-3

Assessment

Quiz

Business

1st Grade

Hard

Created by

Megan Santos

Used 1+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You have an @AuraEnabled method which accepts an SObject from a Lightning Component which will be inserted, how can you easily sanitise

the user’s input?

There is no need, @AuraEnabled method automatically enforce FLS

Use the Database.insertSecure() method

Use the DescribeSObjectResult to check the user permissions for each populated field on the SObject

Use the Security.stripInaccessible() method

Answer explanation

Media Image

The Security class methods are designed explicitly for easily enforcing the FLS of the current user by stripping anything which is not accessible in

the defined context.

While checking each field’s accessibility using the DescribeSObjectResult for the SObject is a valid approach, it is far more verbose and requires

a lot more code to achieve the same results as utilising the Security.stripInaccessible() methods.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can a developer declaratively access a specific custom metadata type (MyCustomMetadataType__mdt) record within Apex?

MyCustomMetadataType__mdt.getRecord(‘Record_Name’);

CustomMetadata.get(‘MyCustomMetadataType__mdt’).get(‘Record_Name’);

MyCustomMetadataType__mdt.getInstance(‘Record_Name’);

MyCustomMetadataType__mdt.(‘Record_Name’);

Answer explanation

Each custom metadata type comes with its own SObject type in Apex. This type contains additional methods which can be used to declaratively

obtain records from a custom metadata type by developer name or record Id. These methods are similar to those found on custom settings.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You have been tasked with importing data from a legacy CRM system into a new Salesforce org. The legacy CRM system had database tables

analogous to the Account, Contact and Opportunity objects within Salesforce. How could you best ensure the relationships are preserved during

this data migration?

Add fields flagged as external Ids for each of the objects to be imported, populated with its legacy CRM Id, use the Data Loader tool,

and set the relationship fields to match these external Ids

Add fields flagged as external Ids for each of the objects to be imported, populated with its legacy CRM Id, write a script to re-establish

relationships after import

Add a field to each object for its legacy CRM Id, after importing each object, export them and use a VLOOKUP function in Excel to

match the Ids

Add a field to each object for its legacy CRM Id, write an Apex trigger that on insert matches the record to its parent

Answer explanation

External Ids allow flagging a field as an Id which is used within an external system. This allows the field to be utilised in Upsert calls, where

instead of specifying the Salesforce Id for a relationship field, the external Id can be used instead. The external Id is then used to find the record

within Salesforce and the relationship field value gets replaced with its Salesforce Id instead. This type of operation is supported by the Data

Loader tool.

Utilising manual methods of doing this match introduces the risk of human error when re-establishing the relationships.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following uses the correct naming convention to be used for naming CustomEvent fired from Lightning Web Components using

dispatch event?

onMyAction

myAction

my action

my_action

Answer explanation

The naming scheme for events within Lightning Web Components follows the DOM event standard. This means that all event names must not

use uppercase letters, have no spaces, and use underscores to separate words.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A developer creates an Apex trigger which calls a method within another class. A test has been written which directly calls the method within the

class and provides 100% code coverage. There are no other Apex classes present within the org. What would be the result of deploying a

changeset with this trigger and classes into production with running all tests?

The deployment succeeds due to code coverage being above 75%

The deployment succeeds due to the total number of lines covered by tests in the deployment being above 75%

The deployment fails because the Apex trigger has 0% code coverage

The deployment fails as the not every component in the deployment has 75% code coverage

Answer explanation

When doing a deployment into production, there must be an average of 75% code coverage for all Apex code within the org. Alongside this, Apex triggers being deployed must have at least 1 line being covered (i.e. they must have been called by at least one test class).

When running deployments, there is the option to run a subset of tests which changes the code coverage behaviour. When running the default testing mode, all tests are executed and the total coverage in an org must meet 75%. However, when running a specified set of tests, every item in the deployment must average 75% instead.

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

A developer wishes to add a picklist to a Lightning Web Component they are building. Which of the following snippets should they use?

<lightning-input type=”combobox”></lightning-input>

<lightning-input type=”picklist”></lightning-input>

<lightning-combobox></lightning-combobox>

<lightning-picklist></lightning- picklist >

<lightning:combobox/ >

Answer explanation

Media Image

The LWC framework follows the HTML specification for how it expects HTML to be written within component templates. This means that for any

components that aren’t base HTML tags, it is required that no component tags are self-closing (i.e., there is always an explicit closing tag).

In LWC, when we wish to display picklists, we should utilise the base component called combobox. In Aura, we can either use the combobox or

the select components, however in LWC we only have the combobox as there is no lightning-select component.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can we best reference external resources (e.g. CSS or JavaScript) within Lightning Components and Visualforce pages?

Upload the resources to a CDN and reference them via link tags within our markup

Upload them as Static Resources

Upload them as External Resources

Add links to our markup pointing to the external resources

Answer explanation

Media Image

Whenever we wish to use external resources within our application, we should upload them as Static Resources. Uploading the files as Static

Resources improves our applications security, as it shifts the control of the resources to be ours, instead of a third-party site which could end up

having malicious code embedded without our knowing.

Lightning Components require all third-party resources to be uploaded as Static Resources and loaded through the Platform Resource Loader,

however Visualforce can reference external URLs.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?