CompanyLirik Infotech
Focus AreaSalesforce Developer
Questions27+
Topics5

Lirik Infotech – Salesforce Developer Interview Questions

What's Covered

Topics covered in this interview.

01Lightning Web Components6
02SOQL & Data1
03Apex & Triggers7
04Salesforce Core Concepts4
05General & Experience9

All Interview Questions

Every question asked in this interview, listed one by one.

1How to create picklist in LWC?
2Give the use case of application event and component event
3What complex implementation you have done in lighting web component?
4How to pass parameter from one component to another in lightning web components?
5Have you worked in LWC?
6What exactly you developed in Lightning Web Components?
7What is mixed DML error have you faced this type of error?
8What is difference between future and queueable ? Give with real time use case.
9What is batch apex ? Explain and give real time use case.
10What is heap size ? have you faced this type of error and how to overcome?
11What is best practice of test class ?
12Apex trigger and best practices.
13What is recursive trigger and how to avoid it?
14What last scenario you developed in trigger give the business requirement?
15Have you worked on integration? Can you give me a real time use case of integration.
16Platform events in salesforce  ?
17What certifications you have done ?
18In which cloud you have mostly worked? Have you worked on Community cloud
19Introduce yourself & Roles and Responsibility.
20What is view state and how to overcome it.
21What is action function and action status give use cases.
22In VisualForce page we two picklist and there are four values and I want to replace value from one picklist to another how can you do this? Example: You have selected Billing Country field value then on Shipping Country same value should appear.
23What challenges you have faced during salesforce career.
24Can you explain Scrum process?
25Explain your project in Detail Roles and Responsibility.
26What is knowledge Article?
27What major difficulty you faced during project development?

Preparing for a Salesforce developer interview?

Browse more real company interview experiences and hands-on Apex trigger patterns.

Quick answers to key questions

Short answers to the technical questions above. For project, certification and team questions, answer from your own experience.

Lightning Web Components

  • Application event and component event. A component event is used between a component and its parents in the same hierarchy, for example a child telling its parent that a button was clicked. An application event is broadcast to any component that listens, so it suits unrelated components. Both are Aura concepts. In LWC, use custom events for child to parent, and Lightning Message Service for unrelated components.
  • How to pass data between components in LWC. From parent to child, use a public property marked @api. From child to parent, dispatch a custom event. For unrelated components, use Lightning Message Service.

Create a picklist in LWC

Use the lightning-combobox base component with an array of label and value pairs.

<!-- html -->
<template>
    <lightning-combobox
        label="Rating"
        value={selected}
        options={options}
        onchange={handleChange}>
    </lightning-combobox>
</template>

// js
import { LightningElement } from 'lwc';
export default class RatingPicklist extends LightningElement {
    selected = 'Hot';
    options = [
        { label: 'Hot', value: 'Hot' },
        { label: 'Warm', value: 'Warm' },
        { label: 'Cold', value: 'Cold' }
    ];
    handleChange(event) {
        this.selected = event.detail.value;
    }
}

To load the values of a real picklist field, use the getPicklistValues wire adapter instead of a fixed array.

Apex and triggers

  • Future and queueable. A future method is simple, returns nothing and accepts only primitive parameters. A queueable class accepts complex types such as sObjects, returns a job Id so you can monitor it, and can chain another job. Use future for a quick callout or to avoid a mixed DML error, and queueable when the job needs objects or follow-up jobs.
  • What is batch Apex, with a use case? Batch Apex processes a large number of records in chunks, each in its own transaction. A typical use case is a nightly job that cleans or updates millions of records, such as setting expired records to inactive.
  • What is heap size? The memory that your variables use during a transaction. The limit is 6 MB for synchronous code and 12 MB for asynchronous code. To avoid the error, query only the fields you need, process records in a SOQL for loop or in batches, and clear large collections when you no longer need them.
  • Test class best practices. Use @isTest, create your own data (do not use SeeAllData=true), test positive, negative and bulk cases, use Test.startTest() and Test.stopTest(), use System.runAs() for permissions, and assert the results.
  • Trigger best practices. One trigger per object, logic in a handler class, bulkified code, no SOQL or DML in loops, and a way to avoid recursion.
  • Platform events. Custom event messages used for event-driven integration. You publish them from Apex, flows or APIs, and subscribers such as triggers, flows, LWC and external systems react to them.
  • Mixed DML. It happens when a setup object (for example User) and a non-setup object (for example Account) are changed in one transaction. Do one of them in a future method or queueable job.

Recursive trigger and how to avoid it

A recursive trigger fires again and again because its own DML triggers it again. Stop it with a static variable.

public class TriggerControl {
    public static Boolean hasRun = false;
}

trigger AccountTrigger on Account (after update) {
    if (TriggerControl.hasRun) return;
    TriggerControl.hasRun = true;
    // logic that updates records
}

A single Boolean can skip legitimate records in the same transaction, so for bulk work store the Ids that you have already processed in a static Set.

Visualforce

  • What is view state and how to reduce it? The hidden data that a Visualforce page sends back and forth to remember its state. Reduce it with transient variables, smaller collections, and by not storing query results you do not need.
  • actionFunction and actionStatus. apex:actionFunction calls a controller method from JavaScript and can rerender part of the page. apex:actionStatus shows a message or spinner while that request is running.
  • Copy a value from one picklist to another. Add apex:actionSupport with the onchange event to the first picklist. It calls a controller method that copies the value to the property bound to the second picklist, and rerenders that field.

Other

  • What is a Knowledge article? A record in Salesforce Knowledge that holds help or support content. It goes through draft, review and published stages and can be shared with agents, customers or partners.
  • Scrum process. An agile method where work is done in short sprints (usually 2 to 4 weeks). The roles are Product Owner, Scrum Master and the development team. The main events are sprint planning, daily stand-up, sprint review and retrospective, and work comes from a prioritised product backlog.