User Interface Flashcards
What elements are required to use Remote Objects?
apex:RemoteObjects and SObjectModel
How to pass errors from Apex to Aura/LWC?
- Try/catch
- AuraHandledException
- Checking response state in JS
When Remote Objects can be utilized?
You want to create, edit objects without using Apex Code.
When Remoting can be utilized?
- Execute complex server-size logic.
2. High-load traffic.
Which Visualforce component can be used to show the status of asynch request?
apex:actionStatus
startText
stopText
id=
Which of the following tags is used on a Visualforce page in order to display messages generated for all components on the page?
apex:pageMessages
What tag is used to display a message for a single referenced component?
apex:pageMessage
What is correct syntax to specify the message as en error in Visualforce?
ApexPages.Severity.ERROR
Advantages of Javascript Remoting
- Stateless.
2. Asynchronous
What tags are supports action attribute?
commandButton commandLink actionPoller actionSupport actionFunction apex:page
How to catch and display errors in Visualforce?
- Try / catch
- ApexPages.addMessage
- apex:pageMessages
Where reRender attribute can’t be utilized?
In cases, where there is a need to update table
How to show Lightning Experience’s toast errors in Visualforce env?
sforce.one.showToas({toastParams})
How to make continuation work in Aura/ LWC?
- Add the continuation=true annotation to the action method that returns the continuation instance.
- (Optionally, but recommended) Add the cacheable true annotation to the method that returns the continuation instance
What can be used to display error messages to users in the Salesforce user interface?
- lightning-platform-show-toast-event (lwc)
- apex:pageMessages (visualforce)
- lightning:notificationsLibrary (aura)
How to import static resources in Aura?
- ltng:require + scripts styles attributes and $Resource global variable.
How to import static resource in LWC?
- Import loader from platformResourceLoader
- Import static resources from @salesforce/resourceUrl
- Use loadScript, loadStyle
How to override standard action with Aura component?
Create a component that implements lightning:actionOverride
Which annotation allows Aura component to be used as a quick action?
force:lightningQuickAction
How to check user permission in LWC?
import @salesforce/customPermission or @salesforce/userPermission to check for assignment of the current user
How to allow to communicate the Visualforce / Aura / LWC to communicate to each other on the same page?
Lightning message service
How to make a LWC as a object specific action?
ScreenAction
lightning_RecordAction
Can LWC call global actions?
No. In this case lwc included in Aura
How to get form-factor and determine if current device Phone or Table?
Use $Browser global variable
Pros of static resources:
- Load third-party library and reuse in Aura/LWC/Visualforce
- Maintain consistent look across components.
What are values are supported by targetConfigs[i].supportedFormFactors[i] attribute?
Small, Large
How to close modal in lwc using JS?
Dispatch CloseActionScreenEvent
What suffix has messageChannel in LWC?
__c