WorksheetsLWC Sessions Quiz 3
Total questions: 14
Worksheet time: 8mins
How you write Expression in LWC HTML?
LWC:If="{propertyName}"
LWC:If={propertyName}
LWC:If={!propertyName}
LWC:If="{!propertyName}"
What are the Files we can have in LWC Folder (multiple answers)
Template
CSS
Meta File
JavaScript
In LWC, the easiest way to work with salesforce data is to use ____?
Which is built on lightning data service.
Base Lightning Component
Apex
API callouts
Import Apex Method in LWC: Is the below syntax Correct?
import apexMethodName from '@salesforce/apex/Classname.apexMethodReference';
YES
NO
To expose an Apex method to a Lightning web component,
the method must be static and either global or public. And method must be annotate with?
@EnableAura
@AuraEnable
@LWCEnabled
@AuraEnabled
To access object and field API names, use an import statement.
All object and field imports come from
@salesforce/schema
@salesforce/Apex
lightning/schema
To trigger a toast from a Lightning web component, in the component’s JavaScript class,
import {?????} from 'lightning/platformShowToastEvent';
getRecords
getRecord
ShowToastEvent
To trigger a toast for error, what variant value to pass in the ShowToastEvent.
error
warning
success
Info
In the Toast Event parameters if you don't pass the variant value. What will be its
default value taken from the following?
error
warning
success
Info
To render HTML conditionally, what directive to select from the following in the template tag.
LWC:If
If:LWC
If={property}
The getRecord is used to query a record from the Salesforce database,
this method takes how many parameters?
1 RecordId
2 RecordId and Fields
None
How many ways are there to call Apex method from Lightning Web Component:
Two
one
Three
Lightning data service is built on the top of User Interface API.
TRUE
FALSE
Lightning Data Service handles sharing rules and field-level security for you.
In addition to simplifying access to Salesforce data.
TRUE
FALSE
