Interview Questions - 4


1. 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 


2. 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.

3. Is there any limitations to use @future?
A: @future: future annotation to identify methods that are executed asynchronously.

   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 datatypes, or collections of primitive datatypes.
   4. Methods with the future annotation cannot take sObjects or objects as arguments.
   5. Methods with the future annotation cannot be used in Visualforce controllers in either getMethodName or setMethodName methods, nor in the constructor.

4. After executing workflow rules agin before triggers and after triggers will execute, How can you avoid?
A: we have to set the value to already defined field so triggers cannot fire again.

5.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

   * Is loosely typed, the object and its attributes can be variable.
   * Takes an array of key-value pairs.
   * Does not contain metadata about objects and fields.
   * Can be used against many Salesforce.com organizations.

6. What are the types of WSDL's?
A: 1.Enterprise WSDL
   2.Partner WSDL
   3.Apex WSDL
   4.Metadata WSDL
   5.Delegated Authentication WSDL

7. For an email format data entering how can you write validation rules?
A: By using regex function

8. What is SFDC life cycle ( After getting the requirements what will be the steps)?
A:  Analysis, Design, Develop the code in the sandboxes, writing unit tests, and moving to test sandboxes to test 
   and then deploy to production with adequate code coverage. 

9. How can you avoid governer limits?
A: Using batches we can avoid governor limits.

10.Have you used any annotations?
A:Yes.

11.What is group by? When will you use?What is having? When will you use?beside Groupby is it possible to use having?
A:While using aggregate functions we should use group by. Group by is used in soql queries to fetch the records by grouping based on specific fields
   Yes we can use having.

12. What is the diffrence between List, set, map?
A: List:
    List is a Unordered collection of values. It contains duplicate values. Each value is retrieved using the List Index.

   Set:
    Set is an ordered collection of values. It does not contains duplicate values.
   
   Map:
     Map is a key value pair datatype.duplcate value but not duplicate key.

13. What is the difference between workflow and Triggers?
A: workflow                                                            Trigger

  1. workflow is inbuilt functionality                      1.Trigger is used for complex business process
     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 occur like 
     insert, update occur.workflows cannot fire                insert, update, delete.in deletion trigger 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.


14. How can you display error messages on visualforce page?
A: <apex:pagemessages/>

15. Call by reference and call by value in APEX?
A:  Object references are call by reference and primitive types are call by value.

16. I need to put five radio buttons how can you do that?
A: Using <apex:selectRadio> tag. 

17.How can you show error messages on VF pages?
A: ApexPages.addMessage()

18. 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

Comments

Post a Comment

Popular posts from this blog

Page Layouts

SOQL Scenario-1