Ques Interviews
Ques Interviews
yes, it is possible , using aysnc and await it is possible. Apex method should be
auraenabled and callout=true
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.
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");
},
})
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.
15. Difference between Rendered Call back and connected call back?
https://salesforce.stackexchange.com/questions/313806/connectedcallback-vs-
renderedcallback-in-lightning-web-component