Interview Questions
Interview Questions
-----------------------------------------------------------------------------------
-----------------------------------------
-----------------------------------------------------------------------------------
---------------------------------------
while sharing record if we are sharing to a public group then there is a option
that is grant access using heirachy if that is unchecked my manager wont
be able to view the record
The records which are successful that needs to be inserted in batch class except
failed one
when order is created i have to send data to 10 systems hows that possible
-----------------------------------------------------------------------------------
---------------------------------------
what is relationship between product, price
what are the standards by salesforce that needs to be followed while doing
integration
diff between connected app & remote site setting
why we use connected apps
What are required parameters in postman to test salesforce integration
Why rest used not soap for integration
-----------------------------------------------------------------------------------
--------------------------
unselective query
check how to use aggregate query
query related exceptions
record lock exceptions & how to solve
owd is read only & on profile user do not have read only access
using quick action i have to show toast message when data is process by using lwc
-----------------------------------------------------------------------------------
------------------------------
Creates the number of contacts which are equal to the number which we will enter in
the Number of Contacts(Number) field on the Account Object.
conToCreate.add(con);
}
}
if(conToCreate.size() > 0)
insert conToCreate;
conToCreate.add(con);
}
}
else{
accContactMap.put(acc.Id, oldMap.get(acc.Id).NoOfContacts__c -
acc.NoOfContacts__c);
}
if(conToCreate.size() > 0)
insert conToCreate;
}
with sharing without sharing
i have 2 classes without sharing can we call method of 1 class in 2nd class
can we debug flow with perticular user
in how many ways we can call apex from lwc js filewhat are the precautions we need
to take when we are calling a method from @wire
sales process in sales cloud
before vs after triggers
if we are using before trigger can we do DML & why?
recurssive trigger
depth of recurssive trigger
how to avoid recurssive trigger
shadow clone & deep clone
-----------------------------------------------------------------------------------
------------------------------
account : billing & shipping address
if billing address is updated then create a task & assigned to primary contact
there is field on contact called isprimary that will be true.
---------------------------------------------------------
trigger on Account AccountTrigger(before update, after update){
if(acc.BillingAddress != accountMap.get(acc.Id).BillingAddress){
accountId.Id(acc.Id);
}
for(Account acc : [select id, name, (select id, name from contacts where
isprimary__c = true) from account where Id in: accountId]){
if(taskToCreate.size() > 0)
insert taskToCreate;
}
-----------------------------------------------------------------------------------
------------------------------
debug log - list of cases & tasks
for(case cs : [select id, casenumber (select id, Name from tasks where status =
'open') where id in: caseId]){
System.debug('CaseNumber '+ cs.casenumber);
System.debug('Task List '+ cs.tasks);
}
workflow same object which one get executed 1st - its unpredictable
how to call apex method from component
application event component event
how to get id in vf using standard controller
how to control record level and object level access
schedule class from execution window
component related questions
sharing record related questions like on what basis we can share the records and to
whom
profiles and permission set related questions
triggers and trigger events and related questions
in which scenario workflow can be schedule
test.start and test.stop use
skip a piece of code in test class
test class related questions
methods for metadata and custom setting
diff between list and hierarchy in custom setting
batch default size & max size
salesforce latest release
how to enable manual sharing
lwc annotation
stop recursive trigger
how to implement integration and related questions
execute batch in test
diff queueable, schedulable, @future
trigger before vs after
setup integration
annotation used in lwc and aura
cascade delete of account
in what scenario we should use @future
save point in salesforce
public vs global in apex class
-----------------------------------------------------------------------------------
-----------
Create a list having duplicate values and display only unique values from them
write a trigger to find the count of active related contacts for an account and
update that count on account
Create a trigger on opportunity to add all the contacts having the same account as
opportunity.account into the opportunity "Contact Roles"
Example : Account: Birla have 3 Contacts: Suraj, Akshay & Ganesh then while
creating an opportunity for Birla add Suraj, Akshay & Ganesh to Opportunity Contact
Roles
Interview Questions
Tell me something about yourself and your journey in salesforce
have you worked on administration part
salesforce security model
diff between profile and roles
permission set
In how many ways can we share a record? 1.Role Hierarchy. 2.Organization Wide
Defaults. 3.Manual Sharing. 4.Criteria Based Sharing Rules. 5.Apex Sharing.
Can we delete user? freez and deactivate ?Why we cant delete users in salesforce
Types of report in salesforce
What are Bucket Fields in Salesforce?
types of relationship in salesforce? how can we achieve many to many
if i have two master details on a object if i delete a master record what will
happen
*You can convert a master-detail relationship to a lookup relationship as long as
no roll-up summary fields exist on the master object
*You can convert a lookup relationship to a master-detail relationship if the
lookup field in all the records contains a value.
diff between workflow and process builder
How to call apex from process builder - @InvocableMethod
Development
Governer limits in salesforce
best practices in salesforce
salesforce order of execution
have you worked on apex class, triggers and asynchronous apex
Is it possible to edit Apex / Visualforce page Class/Trigger in the Production
Environment?
Trigger events in salesforce
what are trigger context variables in salesforce
For the same event if there are multiple triggers on the object, how to control the
order of execution? - We cannot control the order of execution in this situation.
It is recommended to have only one trigger per one object.
when we can use before undelete
what is recurrsion
how can we stop recurssive triggers
different types of asynchronous apex - Future Methods, Batch Apex, Queueable Apex,
Schedules Apex
What are the methods of Batch Apex Class?
default batch size. How to call another batch from one batch.
Is it okay if we did not define finish method in batch class
Can we use @future annotation in batch class
How to cover the code for a batch class? - To cover the code for the batch class we
should call the batch class from the inside of the Test.startTest() and
Test.stopTest().
Types of controller in salesforce
What is difference betwn standard & custom controller
Syntax to use standard and custom controller at same time
What is the purpose of test class
have used @isTestRunning
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)
What are all component bundles we deal with while working with Lightning Component?
Following are the component bundles we deal with while working with Lightning
Component.
Component: contains markup.
Controller: handles the client side events.
Helper: write the common logic inside helper which can be used by different
controller methods, avoiding repetition.
Style: contains the style for the component.
Documentation: used to record the component’s use.
Renderer: contains the default rendering behaviour of a component.
SVG: the icon which gets displayed before the component name in the Lightning App
Builder.
Design: control which attribute we can expose to tools like the Lightning App
Builder. It helps with component re-usability.
Q. Which interface should you use if you want your component to be available for
all pages?
You can use the flexipage:availableForAllPageTypes interface.
Q. Which interface should you use if you want to get the id of the record from the
record Detail page?
You can use the force:hasRecordId interface.
11. Which interface should you use if you want to override a standard action?
You will need to use the Lightning:actionOverride interface
Which interface should you use if you want your component to be used a tab?
You will need to use the force:appHostable interface.
Which interface should you use if you want your component to be used a quick
action?
You will need to use the force:lightningQuickAction interface.
2) @track
3) @wire
-----------------------------------------------------------------------------------
-----------------------------------------
how to manager more than 50 milion records in batch class
integration related question like inbound & outbound call\
how to read the response received in api call
how to de secure authentication for inbound & outbound call
in how many ways we can call apex class in LWC (wire & imperative)
child to parent & parent to child communication
-----------------------------------------------------------------------------------
-----------------------------------------
view state
plateform event
system.runAs
Test.starttest * test.stoptest
use of rendered in aura
annotations used in lwc
what is recurrsive trigger & how to avoid it
apex methodologies = best practices
promises in javascript
future vs queueable
governer limit in salesforce
custom setting vs custom metadata
before trigger vs after trigger
access specifier in salesforce
String sample1;
String sample2;
sample1 = s1;
sample2 = s2;
String sample1;
String sample2;
String sample3;
sample1 = s1;
sample2 = s2;
sample3 = sample1 +' '+sample2;
}
trigger
account
countact - manage a field
when a new contact is added under account then we need to isLastChild__c to true.
and for other contact under the same Account make the isLastChild__c as false
write trigger for that in apex
ContactTriggerHandler.afterInsert(trigger.New);
accountIdSet.add(con.Id);
contactIdSet.add(con.Id);
conList.add(contact);
}
for(Contact con : [select id, isLastChild__c, Name from contact where AccountId In:
accountIdSet AND isLastChild__c = true AND Id NOT IN: contactIdSet]){
conList.add(contact);
if(conList.size() > 0)
update conList;
-----------------------------------------------------------------------------------
-----------------------------------------
bulk api
how to import millions of records in salesforce
in which trigger scenario we will get record is read only
in before record triggered flow can we call subflow
lwc lifecycle hook parent to child
insert 2000 record batch size is 500, & howmmany records get process in trigger
can we have trigger.new & trigger.newmap in before trigger
ci/cd
which deployment tools you have used for deployment
with sharing / without sharing
what kind of flows we can create
what is difference between 15 & 18 digit record Id
platform events
-----------------------------------------------------------------------------------
-----------------------------------------