0% found this document useful (0 votes)
10 views2 pages

Ques Interviews

ques

Uploaded by

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

Ques Interviews

ques

Uploaded by

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

1. Object called school. Quick action is created.

On click of that button create a


list of students.
sending the records, receive the response, and update the record in salesforce .Can
we do this same transaction.

yes, it is possible , using aysnc and await it is possible. Apex method should be
auraenabled and callout=true

2.Aura inside LWC and LWC inside Aura - is it possible?


Aura inside LWC is poosible but not LWC inside aura.

3.SOQL 101 how to avoid? we are not using query inside for loop ? How to handle
this scenario
Can we move something to quueable and future methods?
Queries outside for loop SOQL 101 can be avaoided, if not using query inside for
loop , make sure method having query is not called from any for loop, It dealing
with
large data better to move to batchable or Queueable and use Query locator.

4.Difference between queueable and future methods? Why future method does not
accept sobjects, like list of records/accounts
Future method is ideal for small transaction, Where queuable can be use for
chaining purpose upto 5 level, in queuable you can track the job id but not in
future jobs.
Future doesn't accept the list of sobject becuase it run when resources are
available and if it accept the Sobject there is possibility data is manipulated by
that time.
hence it only accept primiptive data type.

5.Is it a good idea to call batch class from trigger?


It dependent upon usecase, if requirement is to proceess the large volume of data
imidialy after changes in record there is no
harm in calling batch class, but if it is small transaction then better to go with
future

6.Have you added multiple .js files under LWC components?


yes, it is possible, like having label is seprate JS file,if there are too many
apex method that can be in seprate js file and export it and import in main js file
so its more readable.

7.How to add External javascript file in Visualforce,Aura Component and LWC.


you can import them in AURA or LWC, search n google for exact syntax.
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/
js_third_party_library

8.Can you add lightning component in Classic Page Layout?


You can't directly, you have to embed them in VF page.

9.Can we call screen flow inside aura component?


by embedding flow in aura
<lightning:flow aura:id="flowData" />

JS
({
init : function (component) {
// Find the component whose aura:id is "flowData"
var flow = component.find("flowData");
// In that component, start your flow. Reference the flow's API Name.
flow.startFlow("myFlow");
},
})

10.How to call apex class inside flow?


by annotating method as @invocable

11.How to capture success and failure records in Batch Class?


in finish method you can query job status using job Id
AsyncApexJob a = [Select Id, Status,ExtendedStatus,NumberOfErrors,
JobItemsProcessed,TotalJobItems, CreatedBy.Email from AsyncApexJob where Id
=:BC.getJobId()];

12.Suppose we have 1000 records,900 records were successful and 100 would fail.Can
we write bacth apex in such a way that batch class should run again
if any record fails i.e Can we run the same batch class again in finish method.
yes,
if in above query there is failure, call the same batch from finish method.

13.Can we reduce the access level in Permission Sets?


No, Permission Sets is for leveraging access.

14.Can we call future method in Trigger.


yes it is possible, but future can't be call from another future or batch class,
and calling batch from future is also not possible.

15. Difference between Rendered Call back and connected call back?
https://salesforce.stackexchange.com/questions/313806/connectedcallback-vs-
renderedcallback-in-lightning-web-component

16. Can we assign @api to java script method in LWC.


Yes it is possbible , if child method need to be called from parent then it is
required to have method declared as api.

You might also like