KEMBAR78
TCS Salesforce Developer Interview Question and Answer | PDF
0% found this document useful (0 votes)
154 views7 pages

TCS Salesforce Developer Interview Question and Answer

The document discusses Salesforce interview questions and answers. It covers differences between Trigger.new and Trigger.old, the use of trigger.isexecuting, why objects cannot be passed as arguments to future methods, what happens if a future method is queued before maintenance, and whether a record ID changes if an deleted record is undeleted.

Uploaded by

Shubham Gupta
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)
154 views7 pages

TCS Salesforce Developer Interview Question and Answer

The document discusses Salesforce interview questions and answers. It covers differences between Trigger.new and Trigger.old, the use of trigger.isexecuting, why objects cannot be passed as arguments to future methods, what happens if a future method is queued before maintenance, and whether a record ID changes if an deleted record is undeleted.

Uploaded by

Shubham Gupta
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/ 7

Salesforce

Iterview Questions
Anserwer
1.What is the difference between
Trigger.new and Trigger.old and
Trigger.newmap and Trigger.oldmap ?

Trigger.new returns new records and


Trigger.old return data before updates
were done. Trigger.newmap returns
new records with id's and
Trigger.oldmap return data before
updates were done with id's.
2. What is the use of trigger.isexecuting?

Suppose we have a method in apex class


and we want this method to run only
when the method is getting called from
apex trigger than we can make use of
trigger.isexecuting in apex class to check
if the method is getting called from
trigger .
3. Why we cannot pass objects as arguments
in future method? Is it possible to call future
method from Batch class or another future
method?

Object data might change between the


time you call the future method and the
time it actually executes. and hence we
pass record id. No, we cannot call future
method from Batch class or another
future method.
4. If the future method was queued before a
service maintenance what will happen?

It will remains in queue and when maintenance is


over and resources are available it will get execute.

5. Is the id of record changes if we undelete a


deleted record?

No, It has the same id.


6. What is database.stateful interface?

Batch Apex is stateless. Each execution of a batch


Apex job is considered a discrete transaction. If
we implements Database.Stateful we can
maintained state across transactions. Using
Database.Stateful only instance variable holds
values static members does not hold values. If we
want to count records as batch proceeds
maintaining state is important as after one
transaction new transaction will start and
members will loose their values.
Thanks for Reading

Follow for more insights!!

You might also like