Professional Documents
Culture Documents
Use the transient keyword to declare instance variables that can t be saved, and s
houldn t be transmitted as part of the view state for a Visualforce page. For exam
ple:
Transient Integer currentTotal;
You can also use the transient keyword in Apex classes that are serializable, na
mely in controllers, controller extensions, or classes that implement the Batcha
ble or Schedulable interface. In addition, you can use transient in classes that
define the types of fields declared in the serializable classes.
Declaring variables as transient reduces view state size. A common use case for
the transient keyword is a field on a Visualforce page that is needed only for t
he duration of a page request, but should not be part of the page s view state and
would use too many system resources to be recomputed many times during a reques
t.
Some Apex objects are automatically considered transient, that is, their value d
oes not get saved as part of the page s view state. These objects include the foll
owing:
* What is call out and what is call in?
A) Making requests to external system from salesforce is callout.
Getting requests from external system is call in.
example of setting a custom timeout for HTTP callouts:
HttpRequest req = new HttpRequest();
req.setTimeout(2000); // timeout in milliseconds
* How many ways we can schedule Batches?Is it possible to schedule with external
tool like data loader?
A) We can schedule batches using dataloader.
We can use Schedulable interface to schedule batches
Yes, We can schedule the data loader using CommandLine Interface.
* Is there any limitations to use @future?
A) @future: future annotation to identify methods that are executed asynchronous
ly.
Yes,the following are @future limitations.
1. No more than 10 method calls per Apex invocation
2. No more than 200 method calls per Salesforce license per 24 hours
3. The parameters specified must be primitive dataypes, arrays of primitive data
types, or collections of primitive datatypes.
4. Methods with the future annotation cannot take sObjects or objects as argumen
ts.
5. Methods with the future annotation cannot be used in Visualforce controllers
in either getMethodName or setMethodName methods, nor in the constructor.
* After executing workflow rules agin before triggers and after triggers will ex
ecute, How can you avoid?
* Are you using any external tools like bug traker in your company?
* What is the difference between enterprise WSDL and partner WSDL?
A)
Enterprise WSDL
* Is strongly typed, the object and its attributes are fixed.
* Contains the metadata about all standard and custom fields and objects.
* Can only be used against your Salesforce instance.
Partner WSDL
*
*
*
*
A) workflow Trigger
1. workflow is inbuilt functionality 1.Trigger is used for complex business proc
ess
used on single object. in which multiple objects can handle.
2. workflows fire when DML events like 2. Trigger is also same when DML events o
ccur like
insert, update occur.workflows cannot fire insert, update, delete.in deletion tr
igger will fire.
when delete event occur.
3. workflows will only help to update the same object 3. Trigger can work across
objects and where in
or master object in custom master detail relationship. you can query the object
as well as you can do DMLs.
* How can you display error messages on visualforce page?
A) <apex:pagemessages/>
* Call by reference and call by value in APEX?
A) Object references are call by reference and primitive types are call by value
.
* I need to put five radio buttons how can you do that?
A) Using <apex:selectRadio> tag.
* How can you show error messages on VF pages?
A) ApexPages.addMessage()
* Deployment Steps
A)
. Create a Developer Sandbox
Authorize a Deployment Connection
Create and Upload an Outbound Change Set
Validate an Inbound Change Set
Deploy an Inbound Change Set