Salesforce Developer
Interview Question & Ans
Q1 : Describe how to use SOQL to fetch the last three closed won
Opportunities for a specific account.
Ans - SELECT Id, Name, CloseDate FROM Opportunity WHERE
AccountId = :accountId AND StageName = ‘Closed Won’
ORDER BY CloseDate DESC LIMIT 3
Q2 -Explain the lifecycle hooks In LWC?
Ans - ConnectedCallback: Called when the
component is inserted into the DOM. —
RenderedCallback: Called after the component’s
elements are rendered. — DisconnectedCallback:
Called when the component is removed from the
DOM.
Q 3- What is field level security in
salesforce ?
Ans Field-level security in Salesforce
refers to the ability to control access to
individual fields on objects,
Control Read Access
Control Edit Access
Q 4- What is the difference between @api &
@track?
Ans - @api is a decorator used to define a
property or method as publicly accessible in
LWC
@track is used to mark a property or field as
reactive,
Q5- What is the use of @wire Decorator?
Ans - @wire is a decorator used to
connect a component to Salesforce data
or Apex methods.