Salesforce Interview Questions

Q. Javascript remoting for apex controllers
Use javascript remoting in visualforce to call methods in apex controllers from javascript.
Javascript remoting has 3 parts.
1. The remote method invocation you add to the visualforce page, written in javascript.
2. The remote method definition in your Apex controller class.
3. This method definition is written in apex, but there are  few differences from normal action methods.
4. The response handles callback function you add to or include in your vf page, written in javascript.
Q. Adding javascript remoting to a vf page
To use javascript remoting in a vf page , add the request as a java script invocation with the following from.
                 [namespace.] controller.method ( 
                           [parameters….,]
                            Call back Function,
                          [configuration]
                       );
Name space is the namespace of the controller class
Controllers is the name of your apex controller.
Method is the name of your apex controller method you are calling.
Parameters is the comma-separated list of parameters that your method takes.
Callback function is the name of the javascript function that will handle the response from the controller.
Configuration configures the handling of remote call and response.
Q)  What is the main difference between using data table vs .page block table tags ?
 PageBlock: For default salesforce standard format .
 Data table : To design custom formats
Q) Which tag is used with both radio buttons and picklists to create the selectable values?
      tag
Q) What is Multitenant Architecture ?
An application model in which all users and apps share a single, Common infrastructure and code base.
Q)  What is metadata - driven development model ?
An app development model that allows apps to be defined as declarative ‘blueprints”, with no code required. Data Models, objects, forms,workflows, and more are defined by Metadata.
Q)  What are force platform sites ?
Public websites and applications that are directly integrated with your salesforce organization without requiring users to log in with a username and password.
Q)  What  is AppExchange directory ?
A web directory where hundreds of appexchange apps  are  available to salesforce customers to review, demo, comment upon, and /or install. Developers can submit their apps for listing on the appexchange directory if they want to share them with the community.
Q) What are some apex classes that are commonly used within controller ?
 Standard controller, select option, page reference, message, etc,
Q) What are the effects of using the transient keyword ?
The transient keyword prevents the data  from being saved into view state. This should be used for very temporary variables.                                                                 
Q. Configuring javascript remoting requests
Configure a remoting request by proving an object with configuration settings when you declare the remoting request.
javascript remoting supports the following configuration parameters.
NameDatatypeDescription
BufferBooleanWhether to group requests executed close to each other in time into a single request. The default is true.
EscapBooleanWhether to escape the apex methods response. The defaults is true.
TimeouIntegerThe timeout for the request in mill Seconds. Default is 30000(30 second) 
Q. How to invoke  batch apex job (or) how to execute the batch apex job programmatically?
We can use database.executebatch ( ) method to programmatically begin the batch job.
Syntax;
Public static ID execute batch ( sObject class name)
Public static ID execute batch (sObject class name, integes scope)
 
The above two methods are static methods of database class. We can use any one of the method to execute the batch job.
NOTE:
The class name what we are passing to the database.execute batch( ) method should be object of the class which has implemented database.batchable interface.
Q. What is Future Annotation(@Future)?
>>Use the future annotation to specify that these methods that are executed asynchronously.
>>Methods with future annotation must be static methods
>>Methods with future annotation can only return a void type.
Syntax
global class class_name
{
@future
Static void methodname(parameters)
  {
//body of the method
}
Q.What is Metadata-driven development model?
An app development model that allows apps to be defined as declarative “blueprints,” With no code required. Data model, objects, forms, workflows, and more are defined by metedata.
Q. What is S-Control?
S-Controls are the predominant salesforce.com widgets which are completely based on JavaScript. These are hosted by salesforce but executed at client side. S-Controls are superseded by VisualForce now.
Q. Will Visualforce still supports the merge fields usage like S-control?
Yes. Just like S-Controls. Visualforce pages support embedded merge fields.
Q. What is SOAP?
A protocol that defines a uniform way of passing XML-encoded data. SOAP Stands for Simple Object Access Protocol.
Q. What is a Time Trigger?
A setting that defines when time-dependent workflow actions should fire.
Q. Does user can create insert their own custom logo, while creating their own custom applications?
Yes user can upload their custom logo in documents and then they choose that logo for organization.
Q. List things that can be customized on page layouts?
We can customize different things on page layout like, Fields, Buttons, Custom Links and Related Lists. We can also create sections.
Q. What is a “Self Relationship”?
Self Relationship is a lookup relationship to the same object. Suppose let’s take an object “Merchandise”. Here we can create relationship in between the Account to Account (same object) object. That is called “Self Relationship”.
Want To Get SalesForce Training From Experts? Enroll Now For Free Demo On Salesforce Training!
Q. What are the main things need to consider in the “Master-Detail Relationship”?
Record level access is determined by the parent, Mandatory on child for reference of parent, cascade delete (if you delete the parent, it can cascade delete the child).
Q. What is difference between trigger and workflow?
Workflow
Workflow is automated process that fired an action based on Evaluation criteria and rule criteria.
We can access a workflow across the object.
We cannot perform DML operation on workflow
We cannot query from database
Trigger
Trigger is a piece of code that executes before or after a record is inserted or updated.
We can access the trigger across the object and related to that objects
We can use 20 DML operations in one trigger.
We can use 20 SOQL’s from data base in one trigger.
Q. What is Wrapper class?
A Wrapper class is a class whose instances are collection of other objects.
It is used to display different objects on a VF (Visual Force) page in same table.
Q. SOQL Vs SOSL?
SOQL- Salesforce Object Query Language
  • Using SOQL we can Search only on one object one time.
  • We can query on all fields of any datatype
  • We can use SOQL in the Triggers and the classes.
  • We can perform DML operation on sql query results.
SOSL(Salesforce object Search Language)
  • Using SOSL we can search on many objects at one time.
  • We can query only on fields whose data type is text,phone and Email.
  • We cannot use in Triggers but can in calsses.
  • We cannot perform DML operation on search results.
Q. What is difference insert() and database .insert() ?
Using insert method we can insert the records but if any error occurs in any record system will throw an error insertion fail and none of the records are inserted.
If we want to execute partially success of bulk insert operation we will use database .insert.
Q. What is Static Resources?
Using Static Resources we can upload images, zip files, jar files, java script and CSS files that can be referred in a visual force page.
The maximum size of Static Resources for an organization is 250mB.
Q. How to call java script using Static Resource in Visual Force page?
Add java script file in Static Resource setup -> develop -> Static Resources -> click on ‘New’ -> Name: filename and add file from local desktop and save.
We can use that file as follows in Visual Force page.

Source : Mindmajix

Comments

  1. Awesome post, Great information shared with us. keep on posting new things.
    https://bigclasses.com/salesforce-developer-online-training.html

    ReplyDelete
  2. This blog is so cool. I am learning salesforce course online and also I was searching out for salesforce interview question. This blogs helps me find out better understanding about salesforce training. Thank you for this blog!

    ReplyDelete

Post a Comment

Popular posts from this blog

SAP FI (Financial Accounting) Module

Oxyloans Online Peer-to-Peer Lending & Borrowing, Personal Loans, Technology Loans, SME Loans in hyderabad

Professional Makeup artist in hyderabad & Hairstyling academy - First Foundation PRO