0% found this document useful (0 votes)
35 views24 pages

Admin Interviews Questions

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views24 pages

Admin Interviews Questions

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

ADMINISTRTOR –Interview Questions.

1. Different types of relationships in Salesforce?


Lookup relationship Master-detail relationship
Loosely coupled. Strongly coupled.
Roll-up summary field not available. Roll-up summary field is available.
Parent record is not required when creating Parent record is required in order to save a child record.
a child record.
Lookup fields are not required on the page Master-detail field is always required on the page layout of the detail record
layout of the detail record but if you make (because of the point above).
them a required field, it is advised!
Standard object record can be on the detail Standard object record cannot be a child.
side of a custom object in a lookup
relationship.
By default record ownership of child The parent controls the record ownership of child records. The owner field is
records is not controlled by the parent. not available on the detail record in master-detail relationship queues, sharing
rules and manual sharing is not possible for detail records as it requires the
owner field.
You can have a maximum of 40 lookups on You can have a maximum of two master details on an object.
an object.
No cascade delete. Cascade delete.

2. Order of execution in salesforce?


Original records will be loaded first
1. System Validation Rules
2. Apex Before Triggers
3. Custom Validation Rules
4. Duplicate Rules->After this records will be saved but not yet commited
5. Apex After Triggers
6. Assignment Rules
7. Auto-Response Rules
8. Workflow Rules
9. Processes & Flows
10. Escalation Rules
11. Roll-Up Summary Fields

3. Security model in salesforce?


Organization Level - Users, password policies, logins hours and locations.
Layer 1: Object-level Security - Profiles & Permission Sets
Layer 2: Field-level Security - Profiles
Layer 3: Record-level Security -

1|Page
4. Explain Workflows, Process Builders, Flows in Salesforce?

5. What is a Profile?
 A profile is a group/collection of settings and permissions that define what a user can do in salesforce.
 A profile controls “Object permissions, Field permissions, User permissions, Tab settings, App settings,
Apex class access, Visualforce page access, Page layouts, Record Types, Login hours & Login IP ranges.
6. What is a Role?
A role is a record-level access in Salesforce that defines the visibility access of a user in the hierarchical model of an
organization.
7. What is a Permission Set?
It is a collection of Settings and permissions, extends user's access without changing their profile.
8. What is a Public Group?
A public group is a collection of individual users, other groups, roles and subordinates that all have a function in common.
9. What is a Queue?
10. What are sharing rules?
Sharing rules are used to create exceptions to the Organization-Wide Default settings for the users who do not own the
record.
There are 2 types of Sharing Rules in Salesforce based on which records are to be shared:
1. Owner Based
2. Criteria Based
11. What is a Change Set?
- Change sets are used to the migrate customizations from one Salesforce instance to another. There are two types of
change sets, outbound change set and inbound change set.
12. What are the different types of sandboxes?
Sandbox is a replica of production Org. 4 Types:
Developer Sandbox: Developer Sandbox is used for individual developers or small teams. It has storage limit of
200MB.
Developer Pro Sandbox: This type of Sandbox is like a Developer Sandbox, but it has more storage capacity and allows
for more customization. It has storage limit of 1GB.
Partial Copy Sandbox: This type of sandbox is a partial copy of production environment. It allows you to copy a subset
of production data to the sandbox. It has storage limit of 5GB.
Full Sandbox: It is an exact replica of your production environment including all metadata. It has storage limit same as
your production org.
13. What are Record Types?
Salesforce Record Types are a way of grouping many records of one type for that object. These can be applied to any
standard or custom object, and allow you to have a different page layout, fields, required fields, and picklist values.
14. What are Reports and Dashboards?
Salesforce Reports are used to generated data and display the data in the form of Rows and Columns with rule criteria.
Every reports in Salesforce is stored in Folders. We can set folder to hidden, Shared, read-only or read/write. There are
two types of Reports in Salesforce.

2|Page
Salesforce dashboards are pictorial representation of reports data which can be displayed using Graphs, Bar charts, Pie
Charts, Tables, Scatter Chart, Gauges, Metrics, Funnel chart and so on.
15. What is the difference between a page layout and a Lightning page?
Page layouts represent how an object is shown from a detail level.
Lightning pages almost always contain that detail, but also provide other features, like Flow embedding, or Chatter, or
any other format.
Page layouts are close to the object, Lightning pages are close to the app.
16. What is a Custom Metadata and custom settings?
Custom Settings Custom Metadata Types
Type Custom Settings are also similar to custom Custom metadata does not support Hierarchy type of
objects. You can either create a List based or data based on user profile or a specific user.
hierarchy based custom setting.
Deployment Custom settings data cannot be deployed using Custom metadata types data can be easily packaged
packages or Metadata API/Change Sets. and deployed. Metadata types can also be deployed via
Change Sets/Metadata API.
Relationship Custom settings do not support relationship You can create lookups between Custom Metadata
Field fields. objects.
Suffix It has a suffix of “__C” like custom object It has a suffix of “__mdt”
Test Class Custom setting data is not visible in test Custom metadata types are visible in test class without
classes. the “SeeAllData” annotation.
DML in Apex You can perform CUD (Create, Update, Delete) You cannot perform CUD (Create, Update, Delete)
operation on custom setting in apex. operation on custom metadata type in apex.
SOQL You can access custom setting data using With custom metadata types, you can issue unlimited
instance methods and can avoid SOQL queries (SOQL) queries for each Apex transaction.
to database But method is also available.
17. How many emails we can send using flows & In how many ways we can send emails via flows?
We can send upto 5000 mails to external users and unlimited to internal users.

Custom metadata:- Custom metadata is customizable, deployable, packageable, and upgradeable application
metadata.(Custom Metadata Types in Salesforce are a special type of metadata that allows you to create custom records
to store application configuration data.)

18. Custom label in salesforce?


In Salesforce, custom labels are a feature that allows you to create and manage custom text values that can be used in
your application. (Labels, Error messages, help text etc).
19. How do you decide to use before save flow or after save flow?
In Salesforce, a Before-Save flow runs before the record is saved to the database, while an After-Save flow runs
after the record is saved to the database. The behaviour of a Before-Save flow in Salesforce is as follows: It can update
or validate record field values before they are saved to the database.
1. How to decide to use trigger or flow?(Complexity, Data volume, Integration, User interaction, Maintainence and
debugging).
In summary, Salesforce Flow is a no-code visual automation tool for multi-step processes, while Salesforce
Trigger is a code-based automation tool for real-time, record-based actions.
1. Can we call LWC from flow & how?
Yes, We can from screen flows(targets – Lightning__ScreenFlow)
2. Best practices of flow?
Always Test Your Flows
Never Perform DML Statements In Loops
Document Your Flows
Never Hard Code Ids

3|Page
Plan For Faults (negatives)
Utilize Before-Save Flows for Same Record Updates
Use After-Save Flow Instead of Process Builder/Workflow
3. Can we schedule data export in data loader, if yes how?

4. How can we not insert duplicates in dataloader?


Use duplicate rules(block condition).
5. What are duplication rules?
Matching rules and Duplicate rules work together to ensure your org data is duplicate free. So we need to build matching
rules first then we will create the duplicate rules.
6. Can we delete an approval process?
First, we delete the records in the recycle bin.
Then we need to deactivate the approval process in Salesforce.
Only inactive processes can be deleted so at first, you need to do inactivate the approval process & then delete it.
7. Can we delete a role from org? Yes
8. What is cascade delete?
Child gets delete if parent is deleted(In Master-detail relationship only).
9. How many custom fields can be created per object in Salesforce?
Depending on the Salesforce org edition
Professional Edition – 100,
Unlimited and Performance Edition – 800,
Developer Edition - 500
10. At max how many field relationships can be created on an object?
Maximum 40 relationships can be created on an object.
38 look-up and 2 Master-Detail relation fields OR 40 Look-ups.
11. Can we convert a Master – Detail relation to Lookup?
Yes, we can do that, but we need to DELETE the rollup summary field on the Master record if it is created before the
master-detail to lookup conversion.
12. How many maximum Flow versions can be there for each Flow?
50, to create more flow versions, you need to delete the older versions.
13. What are the differences between 15 and 18 digit record IDs?
- 15 digit case-sensitive version which is referenced by the user interface

4|Page
- 18 digit case-insensitive version which is referenced by API(and best used for manipulating data outside Salesforce &) it
is referenced through in the API and other 3rd party tools.
14. How to convert a 15-digit record-Id to 18-digit record-Id?
Using CASESAFEID()
15. What is static resource in Salesforce?
Static resources are useful for storing and uploading various types of files, such as images, documents, zip files,
JavaScript files, and CSS files. The storage capacity for static resources is limited to 250MB.
16. How can you change a lookup field to master-detail?
To convert lookup to the master-detail relationship you need to give parent records on all child records. Then only you can
convert a lookup relationship to a master-detail relationship if the lookup field in all the records contains a value.
17. How can you change a master-detail relation to lookup?
We have to make sure there are no roll-up summary fields on the master object. If there are rollup summary fields we
have to delete those fields to convert it. Deleted Roll-up fields should also be permanently deleted.
37. In how many ways we can make field as required field?
-> During field Creation(By checking required field box).
-> Validation Rules(Giving Conditions)
-> Page Layouts and Record Types.
-> Using Automation tools( Flow, Process, Work flow)
-> trigger
-> LWC
38. Setup vs Non setup Objects in Salesforce?
Set Up Objects: Setup objects are objects that are used to interact with the metadata.
Profiles, Users, Record Type
Non-Set Up Objects: Every native(Std) and Custom Objects fall into the category of Non-Setup.
Account, Contact, CustomObj__c..etc
39. Explain sales cloud and it's mechanism?
40. Can we schedule Dynamic dashboards?
No, we cannot schedule dynamic dashboards.

41. Delete Vs Hard Delete


Delete :- Deleted rows will be stored in recycle bin
Hard delete:- Deleted permanently and cannot be stored in recycle bin

42. Session Settings


Used to control the behaviour of user sessions in Salesforce.(Session security, Session expiration timeout for our org)

43. Lockout Error


Lockout error occurs when a user failed maximum number of login attempts. Salesforce locks the user for a specific
period.(use strong password, two-factor auth, avoid sharing passwords).

44. Deployment process in Salesforce.


This is the crucial process for deploying metadata, configurations, changes from development or sandbox to production.
Steps are:-
->Development – developers make changes to metadata(all development) in developer or sandbox org
->Testing- Developers write test cases and ensures that the developed changes are working as expected or not.(75%
code coverage)
->Migration tools->Salesforce offers many tools such as change sets, Salesforce CLI, Metadata Api, these tools help to
package and deploy from one org to another.
->Packaging-> Changes are grouped into packages for deployment, Contains metadata.
->Deployment->Here we deployed the all packaged metadata from developer, sandbox org to target org(production org).
->Validation->After deployment, its essential to validate that the changes are deployed successfully or not.
->Monitor->Make sure all the deployed changes are working fine or not without causing any issue.

5|Page
What is the purpose of Test.startTest() and Test.stopTest()?
Test.startTest() and Test.stopTest() maintains fresh set of governor limits. Assume that you are consuming 99 SOQL
queries outside of Test.startTest() and Test.stopTest() then if you include any SOQL inside
of Test.startTest() and Test.stopTest() count will start from 1.
Per testMethod we can use Test.startTest() and Test.stopTest() only for one time.
To execute asynchronous methods synchronously we can call those methods from inside
of Test.startTest() and Test.stopTest().

What is the purpose of system.runAs()?


By default test class runs in System Mode. If you want to execute a piece of code in a certain user context then we can
use system.runAs (UserInstance).

Scratch org:- Dev Org allows us to create scratch orgs(Enable dev hub), This is disposable and configurable salesforce
environment that we can use for development and testing. We can create 6 scratch orgs daily and 3 orgs can be
active.(1-30 days time period).

Force.com:- The Force.com platform, which is known as Salesforce.com's platform as a service (PaaS) product, was
launched in 2007. Force.com is a cloud computing platform that allows for developers to quickly build, share, and run
custom business applications over the Internet.

Salesforce Debug logs :- Debug logs are used for troubleshooting the issues and monitoring the performance of the
code.
Types:- User debug log(Captures specific user execution)
-> System debug log(all users)
->Visualforce debug log
->Apex profiling
->Database debug log
->Workflows logs
->Validation debug logs
->Apex callouts logs

Debug Levels :- Determine the type and amount of information recorded by the logs.
Seven types : - None, Error, Warn, Info, Debug, Fine,Finer, Finest

Types of email templates :- Text template, HTML template, Custom HTML, VisualForce, Custom

How to edit Apex classes in Prod

WhoId and WhatId?

WhoId :- Refers to People things, Typically a LeadId or a ContactId


WhatId :- Refers to object type things, Typically AccountId or a Opportunity Id

ISNULL AND ISBLANK

6|Page
The value null represents the absence of any object, while the empty string is an object of type String with zero
characters.

FLOWS:

1. What is flow and it's types?


Flow is a tool that automates complex business processes.
Flows fall into five categories:
Screen Flows:
o These are flows that have a UI element and require input from users. These types of flows are either launched as
an action or embedded as an element on a Lightning page.
Schedule-Triggered Flows:
o These flows launch at a specified time and frequency for each record in a batch, and they run in the background.
Auto-launched Flows:
o Run automated tasks with this flow type.
o Auto-launched flows can be invoked from other flows (sub flow), process builder, from within an Apex class, from
a set schedule, from record changes, or from platform events.
Record-Triggered Flows:
o These flows run in the background either before a record save or after the record is saved when a record is
created, updated, or deleted.
Platform Event-Triggered Flows:
o When a platform event message is received, these flows run in the background.

2. Difference between record triggered flow and Apex trigger?


Triggered Flow Apex Trigger
Suitable for less complex automation scenarios. Especially for complex business logic, Offers greater flexibility
Limitations for handling highly complex logic or bulk data and can handle more complex business logic, bulk data
processing. processing.

Limited debugging options. Debugging is primarily done Developers have more robust tools for debugging, including the
through the Flow Builder interface. ability to use system logs and other development tools.

Deployments:

1. What Are Change Sets In Salesforce?


 Change sets in Salesforce are groupings of components that can be deployed from one Salesforce org to another
Salesforce org. Change sets contain information about the org. They don’t contain data, such as records.
 Outbound change set: An outbound change set is a change set created in the Source organization that you
want to deploy to the target organization. Sending an outbound change set to the target org doesn’t mean that the
changes will be deployed in that org. The change set must be accepted and deployed.
 Inbound change set: An inbound change set is a change set that is sent from the source Salesforce org to the
target Salesforce org. A change set must be deployed for the changes to take effect.
How To Do
1. Create an Outbound Change Set in source org and add all components.
2. Authorize a Deployment Connection in target Org by selecting source org.
3. Upload the Change Set in source org by selecting target org
4. Deploy Changes in the Target Environment by validating components from source org.

Development
APEX :

7|Page
1. Apex best practices?
1. Bulkify Your Code
2. Avoid DML/SOQL Queries in Loops
3. Avoid Hard-coded IDs
4. Use a Single Trigger per SObject Type
5. Have a Naming Convention
6. Avoid Business Logic in Triggers
7.

2. What is bulkify in apex? - Capable of processing large number of records at a time within governor
limits.(Perform Soql and DML statements in Collections)

3. Apex governer limits?


Per-Transaction Apex Limits count for each Apex transaction.
Governor limits are runtime limits that are enforced by Salesforce Platform to ensure that the resources are used
efficiently.
Salesforce developers should be aware of these limits to their code and to avoid hitting limits.
Description Synchronous Asynchronous
Limit Limit
Total number of SOQL queries issued 100 200
Total number of records retrieved by SOQL queries 50,000 50,000
Total number of records retrieved by Database.getQueryLocator 10,000 10,000
Total number of SOSL queries issued 20 20
Total number of records retrieved by a single SOSL query 2,000 2,000
Total number of DML statements issued 150 150
Total number of callouts (HTTP requests or web services calls) in a transaction 100 100
Maximum cumulative timeout for all callouts (HTTP requests or Web services 120 seconds 120 seconds
calls) in a transaction
Total number of sendEmail methods allowed 10 10
Total heap size 6 MB 12 MB
Maximum CPU time on the Salesforce servers 10,000 60,000 milliseconds
milliseconds
Maximum execution time for each Apex transaction 10 minutes 10 minutes

4. Asynchronous apex?
An asynchronous process is a process or function that executes a task "in the background" without the user having to
wait for the task to finish. It executes when resources get available.

8|Page
5. What is the use of static keyword?
6. Difference between with and without sharing keyword?
With Sharing(User-context): Sharing rules will be taken into the consideration and the user can access or perform the
operations based on the permissions given to him on object and fields (Field Level Security, Sharing rules).

Without Sharing(System-Context): Apex class runs in system mode which means Apex code has access to all the objects
and field irrespective of current users sharing rules, field level security and Object permissions.
Default is without sharing.
7. Explain the methods of Batch Apex Class?
Each batch has three methods to be implement.
These are start(), execute() and finish().
The start method is the first one that runs at the beginning of the job. Its purpose is to gather the records or objects that
need to be processed by the execute method.
The execute method gets executed for every set of records that are passed to it. Its main function is to handle all
necessary processing for each group of data.
The finish method is used for carrying out post-processing tasks, such as sending confirmation emails or running
additional operations after all batches have been processed. This method is called once all batches have been
completed.

9|Page
Iterable vs QueryLocator in apex batch class?
if you want to run batch on records that can be filtered by SOQL then QueryLocator is preferable, but if records that you
want to be processed by batch can't be filtered by SOQL then you will have to use iteratable.
Can we call batch from batch?
Yes, a batch class can be called from a batch class but only in the finish method.
Can we call future from future?
We cannot call a future from another future or batch apex. The limit on future method for single apex invocation is
50.
Can we call batch in trigger?
Yes, batch Apex can be invoked using an Apex trigger. But the trigger should not add more batch jobs than the limit(5
apex jobs queued or executing at a time).
Can we make callout in batch?
Yes, Start, execute, and finish methods can implement up to 100 callouts each.
Implement Allows Callouts to enable callouts from the Batch Apex.
Methods marked as future can't be called from a Batch Apex class.
All methods in the class must be defined as global or public.
Can we make callout in future?
Yes, future callouts are made using the @future(callout=true) annotation in Apex. This annotation specifies that the
method will make a callout to an external service. Method must also be static and have a void return type.
8. What is cacheable=true in apex method?
((When you set the "cacheable" attribute to "true", Salesforce caches(Stores) the response from your Apex method.
If we call again same method, The response from this request is stored in the client cache, and it's used for all
components that made this call.))

--->This method helps us to reduce server load and increase the performance of lightning web components.

10 | P a g e
--->If the method is cacheable, it must only get data, it can't mutate data, and only read operations are allowed, DML
operations are not allowed here.

9. What if offset in SOQL?


Use OFFSET to specify the starting row offset into the result set returned by your query.
For example: If there are 50 records then, if we specify offset as 20 in the query then it would return record 21 to 50, it will
skip first 20 records.
10. SOQL AND SOSL?
SOQL :- Stands for 'Salesforce Object query language'
-> Returns records
->SOQL retrieves the data from the database using "SELECT" keyword.
->Retrieve specific records in a single object

SOSL:- 'Salesforce object search language'


-> Returns fields
->Retrieves data from the database using "FIND" keyword.
->Across multiple objects

1. What is stateful in salesforce?


When we declare stateful, only instance member variables retain their values between transactions. Static member
variables don't retain their values and are reset between transactions. Maintaining state is useful for counting or
summarizing records as they're processed.
(Stateful Batch Apex code will maintain state(tracking the count of records processed by execute method) across multiple
execution of the batch job and Stateless Batch Apex code will not maintain state(does not track the count of records
processed by execute method) across multiple execution of the batch job
2. Difference between Keywords and laterals?
Keywords are words that are used as part of code structure, like :for, while, class.
Literals like true, false and null are values that can be assigned, but their names are restricted
3. What is mixed DML ? How to solve?
In Salesforce we can't able to do DML operation both on SETUP obj(Profile, User, recordType) and NON-SETUP
objects(Acc, Con, …) at a time in a single method.
4. How to solve mixed DML exception?
Rather than doing both DML in a single method create a separate class with a future method having SETUP objects DML
and call that method where we are doing NON-SETUP DML.
5. What kind of flows we can call in LWC?
6. Test Classes best practices
-> Use meaningful names
->Test both positive and negative scenarios
->Use @test annotation
->Avoid hardcoded ids
->Test Bulk data
->Maintain code coverage

7. @testsetup
It is used to define a method in test class that runs once before all the test methods in that class. Its purpose is to
create reusable test data that can be used across multiple test methods in that class.

8.Types of errors in Apex classess :-


Compile Time errors :- Occurs when at development or deployment(Syntax errors, type errors, Limit errors)
Runtime Errors:- Occurs when the code is executed( Null pointer, Inder out of bound, DML Exception, Query
Exception, Custom Exception).

11 | P a g e
9. SOQL 101 ERROR :-
-> If we try to run more than 100 SOQL queries in synchronous apex, we get this error.
How to resolve:-
-> Avoid writing SOQL in loops.
->Syntax issue.
->Check object and fields names.
->Check permissions of the user.

10. SOQL INJECTION:-


SOQL injection in Salesforce is a security vulnerability that occurs when untrusted user input is concatenated directly into
a SOQL (Salesforce Object Query Language) query without proper sanitization or parameterization. This vulnerability
allows attackers to manipulate the structure of the query, potentially gaining unauthorized access to data or performing
malicious operations on the Salesforce platform.
-> Unauthorized user input
->Unauthorized data access
->Use Bind variables( Use dynamic values, :colon).

APEX – Trigger

1. What is trigger and event types?


1. before insert
2. before update
3. before delete
4. after insert
5. after update
6. after delete
7. after undelete
2. What are context variables in triggers?

3. When to use Before & After triggers?

4. Under what scenario recursion will happen in triggers and how will you overcome?
Recursion will happen when we are trying to update same record multiple times in a single transaction. We can overcome
it by using Boolean check.
How to handle recursion?

12 | P a g e
5. Difference between "Trigger.New" and "Trigger.old".
Trigger.new : Returns a list of the new versions of the sObject records.
Only available in insert and update triggers, and the records can only be modified in before triggers.

Trigger.old : Returns a list of the old versions of the sObject records.


only available in update and delete triggers.

6. Best Practices of Apex trigger.


-> Use single trigger per object
->Bulkification
->Code coverage
->Use context variables
->Avoid recursion(Use static boolean)
->Maintain readability
->Error handling(try-catch)

Lighting Web Components:

1.What are the benefits of using LWC?


LWC (Lightning Web Components) has several benefits over traditional JavaScript frameworks. Some of them are -
 Modern web standards: LWC is built using modern web standards like HTML, CSS, and JavaScript. This makes
it easier to get started with LWC development.
 Lightweight and fast: LWC can be loaded and executed quickly. This results in faster page load time and a
better user experience.
 Modular architecture: It allows developers to build reusable components, this saves a lot of time and effort in
the long run.
 Compatibility with Salesforce: LWC is fully compatible with the Salesforce platform, which allows the building of
custom components that integrate easily with Salesforce applications and data.

13 | P a g e
 Powerful tools and resources: LWC has a robust set of tools and resources available, (like - a powerful IDE,
comprehensive documentation, and an active community of developers), this makes it easier to learn and use LWC, and
to get help and support when needed.

2.What is the difference between Aura and LWC?

3.Explain the lifecycle hooks of an LWC component?


The lifecycle hooks of an LWC component refer to a series of methods that are invoked during the time of component
creation, update, and removal from the DOM(Document object model). (These methods provide a way to interact and
manipulate the component at different stages of its lifecycle.)
 constructor(): It is the first method that is called when the component is created. And it is used to initialize the
component properties and state.(Use super method first)(Flows from parent to child)
 connectedCallback(): This method is called when the component is inserted into the DOM. And mostly, this
method is used to perform initialization or used to set up event listeners.(Flows from parent to child)
 disconnectedCallback(): This method is called when the component is removed from the DOM. This method is
useful in cleaning up the resources or removing event listeners.((Flows from parent to child)
 (Render() : This hook is used to override the standard rendering functionality. This gets called
after connectedCallback() and returns a valid HTML template.) it’s a protected method
 renderedCallback(): This method is called after the component is rendered or re-rendered. This method can be
used to perform additional initialization or update different tasks that need to access DOM.(Flows from child-parent)
 ErrorCallback(Error,Stack): This hook is called when the component throws an error in one of its hooks. This
method works like Javascript catch{} block for catching errors.

14 | P a g e
4.Explain the concept of data binding in LWC?
Data binding in the LWC is the synchronization between the controller(JS) and template(HTML).
One-Way Data Binding: JS->HTML
Two-Way Data Binding: JS->html
HTML->JS

5.What are decorators? List some built-in decorators provided by LWC?


 @api: This used to define a public property that can be accessed by other components.
 @wire: This annotation is used to connect a component to an Apex method or a wire adapter.
 @track: This annotation defines a reactive property that causes the component to re-render when the property
changes.

6.What is the role of the Lightning Message Service in LWC?


The Lightning Message Service in LWC provides a way for components to communicate with each other using a publish-
subscribe messaging model. It consists of a message channel and message payload, that helps components to send and
receive messages in a loosely coupled manner. (Components can subscribe to a channel to receive messages and can
send messages on a specific channel to any other component that has subscribed to that channel.)
--------->Define channel-->Publish a message---->Subscribe a channel----->Unsubscribe a channel

7.Explain the difference between a getter and a setter in LWC?


Getters are used for retrieving the value of a property (read-only),
Setters are used for setting the value of a property (write access)
Using getters and setters, you can control the behavior and accessibility of properties in your LWC components.
8.Can you explain how to use the JavaScript Promises in LWC and give an example?
10.Parent to Child communication in LWC?
For communicating parent child component we use @api decorator to define a public property which is reactive
11.Child to Parent communication in LWC?
For communicating child to parent we will pass the value to parent by using customevent.

12.Communication between unrelated components?

For creating communication between two unrelated LWC components we use publish-subscribe mode, where one
component works as a publisher and another as a subscriber. To pass the message between two components, we use
LMS(Lightning Message Service).

15 | P a g e
12.Use of Await/Async keywords in LWC?
The keyword async is used to define an asynchronous function. This returns a promise. In the body of this function we
should write our business logic with the await keyword
to pause the execution of the function until a promise is resolved or rejected.

13.Diff b/w Wire and Imperative method?


Wire Property Imperative Method
Your apex method will get called automatically Your apex method will get called if
u expilcitly call
Always cacheable=true required Always cacheable=true not required
Cannot able to perform any DML if we call apex using @wire property Can able to perform any DML if we call apex
using imperative method
ConnectedCallBack() will not work properly coz, the moment CCB
methods calls, the wire is still undefined.
In this case renderedCallBack works as the rcb will render again after
data loads to DOM
Example:

14. Can I call an aura component in a lightning web component?


No, Lightning web components can’t contain Aura components.
Aura components can contain Lightning web components.
If your LWC is nested inside another folder or namespace, adjust the syntax accordingly.

16 | P a g e
For example, if your LWC is in a namespace called custom, and its name is myLWC, the syntax would
be <c:custom/myLWC>. If it's in a folder named components within the custom namespace, it would
be <c:custom/components/myLWC>.

15. Lightning data service - with code example(Record edit form)?


Lightning Data Service is a centralized data caching mechanism that is used to create, read, update and delete a
record(CRUD) without server-side apex code.
 It supports the sharing rules and field-level security as well. Which means user will never has access to
(unauthorized data or will never able to update) the field for which he doesn't have access.
There are three components that are built on Lightning Data Service(LDS)
1.lightning-record-view-form
 This form will allow you to view the record and to customize fields in the form.
2.lightning-record-edit-form
 This form will allow you to create and edit the record and to customize fields in the form.
3.lightning-record-form
 This form allow us to display a form with standard Lightning UI to view, edit, or create a record.

16. Can I deploy LWC with empty CSS file?


No we can't save.
17. How do you get all picklist values of a filed directly in LWC?
To get all picklist values of a field directly in a Lightning Web Component (LWC), you can use
the getObjectInfo and getPicklistValues wire adapters from the Lightning Data Service (LDS).

18.

17 | P a g e
19. What is Lightning Datatable?

In Lightning Web Components (LWC), the lightning-datatable is a standard UI component provided by Salesforce
that allows you to display data in a tabular format within your Lightning Experience or Lightning Communities
applications. It provides a powerful and flexible way to present data to users, with features such as sorting,
pagination, row actions, column resizing, and more.

How to achieve event capturing in Lwc ?

20. Can we use multiple decorators in the same component?


To use a decorator, import it from the lwc module and place it before the property or function. You can import multiple
decorators, but a single property or function can have only one decorator. For example, a property can't have @api and
@wire decorators.

21. Aura components :-

Integration:

1. Difference between Authentication and Authorization?


Authentication is the process of verifying who someone is, whereas authorization is the process of verifying what specific
applications, files, and data a user has access to.
2. What is connected apps?
A connected app is a framework that enables an external application to integrate with Salesforce using APIs and standard
protocols, such as SAML, OAuth, and OpenID Connect. Connected apps use these protocols to authenticate, authorize,
and provide single sign-on (SSO) for external apps.
3. What is OAuth authentication?
OAuth is an open protocol that authorizes a client application to access data from a protected resource through the
exchange of tokens. OAuth tokens are essentially permissions given to a client application. The resource server can
validate the tokens and allow the client application access to the defined protected resources. In Salesforce, you can use
OAuth authorization to approve a client application’s access to your org’s protected resources.
4. What are the parameters required for OAuth?
> Client Id
> Client secret
> Username
> Password
> Grant-type
5. What are webservice methods in salesforce?
Apex class methods can be exposed as custom SOAP Web service calls. This allows an external application to invoke an
Apex Web service to perform an action in Salesforce. Use the webService keyword to define these methods.
6. What are Http methods?

7. Serialization: Converting sObject to JSON

18 | P a g e
JSONGenerator class is used for serialization.
8. Deserialization: JSON to sObject
JSONParser is used for Deserialization.
9. HTTP Status codes?

10. Callout Example


public class HttpCalloutSample {
public String getCalloutResponseContents(String url) {
Http h = new Http();
// GET
HttpRequest req = new HttpRequest();
req.setEndpoint(url);
req.setMethod('GET');
HttpResponse res = h.send(req);
return res.getBody();
}}

// POST
req.setEndpoint(url);
req.setMethod('POST');
req.setHeader('Content-Type', 'application/json');
req.setBody('{Your_JSON_Content}');
HttpResponse res = h.send(req);
return res.getBody();

11. Web service (Call In) Example


@RestResource(urlMapping='/Cases/*')
global with sharing class CaseManager {
@HttpGet
global static Case getCaseById() {
RestRequest request = RestContext.request;
String caseId = request.requestURI.substring(
request.requestURI.lastIndexOf('/')+1);
Case result = [SELECT CaseNumber,Subject,Status,Origin,Priority
FROM Case
WHERE Id = :caseId];

19 | P a g e
return result;
}
@HttpPost
global static ID createCase(String subject, String status,
String origin, String priority) {
Case thisCase = new Case(
Subject=subject,
Status=status,
Origin=origin,
Priority=priority);
insert thisCase;
return thisCase.Id;
}
}

VisualForce Page :

1. What Is Visualforce Page In Salesforce?


Visualforce is Markup language that allows you to describe the User Interface which can live on your Salesforce Platform.
Visualforce pages consist of two elements: Visualforce markup, and a controller.
Standard Controller In Visualforce Page
 Each Salesforce Object (Standard/Custom) always comes with Controller which is known as Standard Controller.
 Basic operations of sObject are already implemented in Standard Controller like,
 Save
 Delete
 Cancel
 Edit
Custom Controller In Visualforce Page
 A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard
controller
 Use custom controllers when you want your Visualforce page to run entirely in system mode, which does not
enforce the permissions and field-level security of the current user
Controller Extension
 A controller extension is an Apex class that extends the functionality of a standard or custom controller.
 When to use controller extensions?
 You want to leverage the built-in functionality of a standard controller but override one or more actions.
 You want to add new actions.
 You want to build a Visualforce page that respects user permissions. Although a controller extension
class executes in system mode, if a controller extension extends a standard controller, the logic from the standard
controller does not execute in system mode.

Apex Test Classes

1. Test class best practises


2. Use of @testsetup?
The @testSetup annotation is used to define a method in a test class that runs once before all test methods in that class.
Its primary purpose is to create reusable test data that can be used across multiple test methods within the same class.

Scenarios – based Questions

20 | P a g e
1. We have an email field on contact, and custom email field on account. If contact is inserted with email, if that
email is present in any account then associate that contact to account. If email is not present then create account and
associate to that
2. If we have 3 LWC components C1, C2, C3 and how we communiate from C1 to C3 ?
3. We hava a datatable in LWC with 20 rows(each row has checkbox), if user selected any 5 records and click
button, all those 5 records needs to transfer to another datatable how?
4. On acc record page we have an LWC and another LWC on Contact record page. How to navigate from account
to contact?
5. If we have email and phone num in account, the combination of email+phone should be unique across all
accounts.
6. Due to some value in renderedcallback, LWC calling again (Recursion) how to stop?
7. While uploading a file using LWC into object record, we are getting size issue(Heap size) how to solve?
8. How to decide whether to use static method or Non-static method?
9. While updating opportunity, sometimes I can update & sometimes getting different errors like: Trigger error, Flow
error, Process builder error, … etc what could be the reason?
10. Throw an error when user tries to delete contact that is not linked with any acc using trigger?
(Tip: addError)

11. Write a trigger to avoid insertion of account if there is an account with the same Email and having related contacts
to it.

12. If we have an approver at level 2 and we freeze user after level 1, what happens?
13. Count the total contacts associated with that account?

21 | P a g e
14. There are 2 objs Account and customObj__c both have same fields
Account Fields : Name, Phone, Email, isValid, Valid
CustomObj__ c Fields : Name, Phone, Email, isValid, Valid
Once we create account, we will give Name, Phone and Email while insertion, then based on same details we need to
fetch isValid and Valid values from customObj__c and assign those values to Account fields(isValid, Valid).

15. Query accounts that DO NOT have any contacts.


Select Id, Name From Account Where Id NOT IN (Select AccountId From Contact)

16. Query all Accounts that do have at least 1 contact.


Select Id, Name From Account Where Id IN (Select AccountId From Contact)

Managerial
1. What are your roles & responsibilities in your current organization?
o As an Associate Developer my role is
o I'll be attending client meetings,
o Then I have estimate the stories and requirements and then creating designs, then development and unit testing
and finally deploy my changes into production.

22 | P a g e
o And also I'm supporting the production and live environment by fixing bugs.
2. What challenges did u face?
One of the biggest challenges I faced in my previous company is that, after 1 year of experience I have added into 2
projects at a time one is own product and other service project
In product project there was a big issue while downloading multiple files from salesforce as there were large number of
files and due to limitation files are not getting downloaded, we were only 3 members and we all have below 3 years of
experience and clients are forcing us to fix that ASAP in that case I have taken extra responsibility, and changed some
changes in architecture of the project in order to get this done and later I have received spot award for this also.
3. Tell me about your project?
 My project is ASK, an Australian based NBFC project which has MVC architecture, with domain driven design.
 It has 2 internal parts
ASKWA(Wealth assessment) - Here user can get services how to manage wealth.
ASKIM(Investment management) - Here user can get services where to manage wealth.
 I was part ASK origination which is used to onboard a user like taking PAN, doing KYC, verifying documents,
getting financial data, … till onboarding into ASK.
4. Why do you want to join our company?
The main reason I want to work here is, I was so excited about the opportunity after going through the JD as it is more
relevant to my skills and it made more interesting after knowing about company which will help me to gain more practical
experience
I think it will be the best place for me to advance my career.
5. What do you know about our company?
 Calpion is an 18-year-old Dallas-headquartered company
 Founded in 2004
 Projects - AnodynePay(For Your end to end Patient payment solution to completely transform your patient
payment experience.)
Hermes Accounts Payable Automation (Easy AI-Powered accounts payable automation for busy accounting teams.)
 Partnerships with Microsoft, Amazon, SAP, HP, Worksoft, Microfocus, Tricentis, etc.
 Industry Focus: healthcare, logistics, supply chain, oil & gas, biotechnology, hospitality, catering, manufacturing,
and airlines.

6. What motivates you at work?


 Learning new things, coming up with creative ideas to improve something, or make something
new, Meeting targets or goals
 Analyzing complex data in order to draw clear and simple conclusions
 Working well as part of a team
 Leading a team to success
 Completing a difficult project, and seeing it through to the end
 Spotting flaws and errors so as to make sure the end result of a project is as good as possible
7. What salary are you expecting?
I am ok with the salary range mentioned in the job description. Considering my experience and industry standards, I'm
expecting an xx% hike from my previous CTC. But I am open to hearing your views.
8. Why are you leaving your current job?
Fortunately, there are plenty of reasons for leaving my previous job
 I want to explore more and feel like I'm ready to take on more responsibility
 I believe I've progressed as far as I can in my current role
 I need a change of environment to motivate me
 I want to develop a new skill that isn't required in my current job
9. What is your strength and weakness?
My strengths are being an honest person, I can use my time effectively, I can easily adapt myself in any working
environment.

23 | P a g e
My weakness is a little overthinking as I do think in all perspectives while taking a decision but I'm overcoming through my
experiences.

24 | P a g e

You might also like