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 asynchronou...

Lightning Web Components Specialist Superbadge Solution Similar Boats Component

 SIMILAR BOATS COMONENT similarBoats.html <template>     <lightning-card title={getTitle} icon-name="custom:custom54">       <lightning-layout multiple-rows="true">         <template if:true={noBoats}>           <p class="slds-align_absolute-center">There are no related boats by {similarBy}!</p>         </template>         <!-- Loop through the list of similar boats -->         <template for:each={relatedBoats} for:item="boat">           <!-- Responsive lightning-layout-item -->           <lightning-layout-item key={boat.Id} padding="around-small" size="12" small-device-size="6"            medium-device-size="4"  large-device-size="4">             <!-- Each boat tile goes h...

Lightning Web Components Specialist Superbadge Solution Five Star Rating Component

FIVE STAR RATING COMPONENT fiveStarRating.html <template>     <ul class={starClass}></ul> </template> fiveStarRating.js //import fivestar static resource, call it fivestar import { LightningElement, api } from 'lwc'; import fivestar from '@salesforce/resourceUrl/fivestar'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import { loadStyle, loadScript } from 'lightning/platformResourceLoader'; // add constants here const ERROR_TITLE = 'Error loading five-star'; const ERROR_VARIANT = 'error'; const EDITABLE_CLASS = 'c-rating'; const READ_ONLY_CLASS = 'readonly c-rating'; export default class FiveStarRating extends LightningElement {   //initialize public readOnly and value properties   @api readOnly;   @api value;   editedValue;   isRendered;   //getter function that returns the correct class depending on if it is readonly   get starClass() {     return this.readOnly ? READ_ONLY_CLA...

Lightning Web Components Specialist Superbadge Solution Boat Add Review Form Component

 BOAT ADD REVIEW FORM boatAddReviewForm.html <template>     <!-- lightning data service code -->     <!-- <lightning-record-edit-form> using boatReviewObject -->     <lightning-record-edit-form object-api-name={boatReviewObject} onsuccess={handleSuccess} onsubmit={handleSubmit}>         <lightning-messages></lightning-messages>          <lightning-layout multiple-rows vertical-align="start">         <lightning-layout-item size="8" padding="horizontal-small">           <div class="slds-form-element">                 <!-- review subject field code using nameField -->                 <lightning-input-field field-name={nameField}>                 </lightning-input-field> ...

Lightning Web Components Specialist Superbadge Solution Boat Detail Tabs Component

BOAT DETAIL TABS boatDetailTabs.html <template>     <template if:false={wiredRecord.data}>       <!-- lightning card for the label when wiredRecord has no data goes here  -->         <lightning-card class= "slds-align_absolute-center no-boat-height">             <span>{label.labelPleaseSelectABoat}</span>         </lightning-card>     </template>     <template if:true={wiredRecord.data}>        <!-- lightning card for the content when wiredRecord has data goes here  -->        <lightning-card>            <lightning-tabset variant="scoped">                <lightning-tab label={label.labelDetails}>                    <lightning-c...

Lightning Web Components Specialist Superbadge Solution Boat Map Component

 BOAT MAP COMPONENT boatMap.html <template>   <lightning-card title="Current Boat Location" icon-name="action:map">     <template if:true={showMap}>       <lightning-map map-markers={mapMarkers} zoom-level="10"></lightning-map>     </template>     <template if:false={showMap}>       <span class="slds-align_absolute-center">         Please select a boat to see its location!       </span>     </template>   </lightning-card> </template> boatMap.js import { LightningElement, api, wire } from 'lwc'; import { getRecord } from 'lightning/uiRecordApi'; // import BOATMC from the message channel import { APPLICATION_SCOPE, MessageContext, subscribe, unsubscribe } from 'lightning/messageService'; import BOATMC from '@salesforce/messageChannel/BoatMessageChannel__c'; // Declare the const LONGITUDE_FIELD for th...

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 -->         ...

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> bo...

Popular posts from this blog

Lightning Web Components Specialist Superbadge Solution Boat Tile Component

Lightning Web Components Specialist Superbadge Solution Boat Search Form Component

Lightning Web Components Specialist Superbadge Solution Boat Search Results Component