Posts

Salesforce Developer Interview Questions

1. Difference between queueable and batch apex?  Batchable Apex: If it is a long-running complex process then you should go for Batchable Apex and you can have an option to schedule the batch to run at a customized time. It can process up to 50 million records in asynchronous mode. 5 concurrent jobs are allowed to run at a time and future methods are not allowed in the Batch class. Batch Class should implement Database. Batchable interface and it should have three methods start(), execute() and finish() methods. Queueable Apex: It comes in handy when you need to have both the operations of Batch and future method and it should implement Queueable Interface. If one job is dependent on another job means here we can chain the dependent job in execute method by system.enqueuejob(new secondJob()); You can also able to chain up to 50 jobs and in the developer edition, you can able to chain up to 5 jobs only. It will accept non-primitive types like sObjects and it also runs in asynchronous mo

Lightning Web Components Specialist Superbadge Solution Boat Reviews Component

BOAT REVIEWS COMPONENT boatReviews.html <template>     <!-- div for when there are no reviews available -->     <template if:false={reviewsToShow}>         <div class="slds-align_absolute-center">No reviews available</div>     </template>        <template if:true={reviewsToShow}>          <!-- div for when there are reviews available -->     <div class="slds-feed reviews-style slds-is-relative slds-scrollable_y">     <!-- insert spinner -->     <template if:true={isLoading}>         <lightning-spinner alternative-text="Loading" size="small" variant="brand"></lightning-spinner>        </template>        <ul class="slds-feed__list">         <!-- start iteration -->         <template for:each={boatReviews} for:item="boatReview">           <li class="slds-feed__item" key={boatReview.Id}>             <a

Lightning Web Components Specialist Superbadge Solution Boats Near Me Component

BOATS NEAR ME boatsNearMe.html <template>     <lightning-card class="slds-is-relative">        <!-- The template and lightning-spinner goes here -->        <template if:true={isLoading}>            <lightning-spinner alternative-text="Loading" size="medium" variant="brand"></lightning-spinner>                   </template>        <!-- The lightning-map goes here -->        <template if:true={isRendered}>            <lightning-map map-markers={mapMarkers} zoom-level="10"></lightning-map>                         <div slot="footer">Top 10 Only!</div>         </template>     </lightning-card> </template> boatsNearMe.js import { LightningElement, track, api, wire } from 'lwc'; import getBoatsByLocation from '@salesforce/apex/BoatDataService.getBoatsByLocation'; import { ShowToastEvent } from 'lightning/platformShowToa

Lightning Web Components Specialist Superbadge Solution Boat Tile Component

 BOAT TILE COMPONENT boatTile.html <template>     <div onclick={selectBoat} class={tileClass}>       <div style= {backgroundStyle} class="tile"></div>       <div class="lower-third">           <h1 class="slds-truncate slds-text-heading_medium">{boat.Name}</h1>           <h2 class="slds-truncate slds-text-heading_small">{boat.Contact__r.Name}</h2>           <div class="slds-text-body_small">               Price: <lightning-formatted-number maximum-fraction-digits="2" format-style="currency" currency-code="USD" value={boat.Price__c}>                            </lightning-formatted-number>           </div>            <div class="slds-text-body_small">Length: {boat.Length__c}                         </div>           <div class="slds-text-body_small">Type: {boat.BoatType__r.Name}                  

Lightning Web Components Specialist Superbadge Solution Boat Search Results Component

  BOAT SEARCH RESULTS boatSearchResults.html <template>     <lightning-tabset variant="scoped">       <lightning-tab label="Gallery">         <template if:true={boats.data}>           <div class="slds-scrollable_y">           <!-- layout horizontally aligned to the center  -->           <!-- layout allowing multiple rows -->             <lightning-layout horizontal-align="center" multiple-rows>               <!-- template looping through each boat -->               <template for:each={boats.data} for:item="boat">                 <!-- lightning-layout-item for each boat -->                 <lightning-layout-item key={boat.Id} padding="around-small" size="12" small-device-size="6" medium-device-size="4" large-device-size="3">                   <!-- Each BoatTile goes here -->                   <c-boat-tile boa

Lightning Web Components Specialist Superbadge Solution Boat Search Form Component

  BOAT SEARCH FORM boatSearchForm.html <template>     <lightning-layout>       <lightning-layout-item class="slds-align-middle">         <lightning-combobox onchange={handleSearchOptionChange} value={selectedBoatTypeId}          options={searchOptions} class="slds-align-middle">       </lightning-combobox>       </lightning-layout-item>     </lightning-layout>   </template> boatSearchForm.js import { LightningElement, wire, track } from 'lwc'; import getBoatTypes from "@salesforce/apex/BoatDataService.getBoatTypes"; export default class BoatSearchForm extends LightningElement {  @track selectedBoatTypeId = '';     // Private  @track error = undefined;     // Needs explicit track due to nested data  @track searchOptions;      // Wire a custom Apex method   @wire(getBoatTypes)     boatTypes({ error, data }) {     if (data) {       this.searchOptions = data.map(type => {         return {      

Lightning Web Components Specialist Superbadge Solution Boat Search Component

BOAT SEARCH COMPONENT boatSearch.html <template>     <lightning-layout multiple-rows>       <!-- Top -->       <lightning-layout-item size="12">         <lightning-card title="Find a Boat">           <!-- New Boat button goes here -->           <lightning-button variant="brand" label="New Boat" slot="actions" onclick={createNewBoat}>           </lightning-button>           <p class="slds-var-p-horizontal_small slds-align_absolute-center">             <!-- <c-boat-Search-Form></c-boat-Search-Form> -->             <c-boat-search-form  onsearch={searchBoats}></c-boat-search-form>                     <!-- boatSearchForm component goes here -->           </p>         </lightning-card>       </lightning-layout-item>       <!-- Bottom -->       <lightning-layout-item size="12" class="slds-p-top_small sld

Popular posts from this blog

Lightning Web Components Specialist Superbadge Solution Boat Tile Component

Lightning Web Components Specialist Superbadge Solution Boat Search Results Component

Lightning Web Components Specialist Superbadge Solution Boat Search Form Component