Wednesday, February 20, 2013

Differences May Ask In Interviews?

Common Differences ask in interviews

Difference between InputField and OutPutField Components?
Ans:
InputField:

  • An HTML input element for a value that corresponds to a field on a salesforce object.
  • It respect attributes of the associated field.like whether the filed is unique or mandatory,if it is pick list ,display automatically picklist input widget is displayed.
  • If we use InputField under PageBlockSection,it always display with their corresponding output label.
OutPutField:
  • A read only display of a label  and value for a field on salesforce object.
  • It also respect attributes of the associated field like if it is currency field,the appropriate currency symbol is displayed.
  • OutPutfield  must be child of PageBlock or PageBlockSectionItem.


InputText Vs OutPutText

InputText:

  • An HTML Input element of type text
  • Use this component get the user input for a contoller method that does not correspond to a field on a salesforce object.
  • InputText Doesnot use salesforce styles.
OutPutText:
  • Displays text on a visualforce page.
  • Customize the appearance  of the component using the css styles.
  • This component doesn't respect the View Encrypted Data Permission.So Instead use OutPutField component  to prevent showing sensitive information to the unauthorized users.
PageBlockTable ,DataTable,Repeater:

PageBlockTable:

  • PageBlockTable should be define inside pageblock or pageblocksection.
  • PageBlockTable uses standard styles sheets to design a visualpage.
  • It has the  required attribute "value".
  • Column headers  will be displayed automatically.
DataTable:

  • No need to write inside pageblock or pageblocksection.
  • There is no required value.
  • The  data can be displayed using  custom style sheets.
  • we need to specify column headers explicitly.
Repeater:

  • There is no proper alignment of data in repeater compared with DataTable.
SingleEmailMessage Vs MassEmailMessage:

SingleEmailMessage:

  • The SingleEmailMessage can send message related to only single record.
  • setTargetObjectId - The ID of the contact, lead, or user to which the email will be sent.
  • Used for single record
  • Messaging.SingleEmailMessage
MassEmailMessage:

  • MassEmailMessage can send mails related to multiple records (WhatId and TargetObjectId).
  • setTargetObjectIds - A list of IDs of the contacts, leads, or users to which the email will be sent.
  • Used for multiple records
  • Messaging.MassMailMessage
 Profile Vs Role:

Profile:
  • Object Level Access can be given by profile.
  • It is Mandatory While creating user.
  • It Manages the salesforce.com license,tabsettings,record types,pagelayouts etc.
Role:
  • Record Level access can be given by Role.
  • Role is not mandatory while creating user.
List,Set,Map:

List:
  • Ordered Collection of Primitive datatypes,sobjects,enums,etc.
  • It allow duplicate values.
  • It Follows Insertion Order.
Set:
  • Unordered Collection of Elements.
  • Its Doesn't Allow duplicate values.
  • It Doesn't follow Insertion Order.
  • When We try to add duplicate Element,element is not added and Add() method returns false.
Map:
  • Map is a key-value pairs.keys represents Unique and primitive,value can be primitive,sobjects,colletion,apexobjects.
  • It Will not follow insertion order.
  • When we try to give duplicate key,put() return existing key value and replace existing key value with new value. 

SOQL VS SOSL

SOQL:
  • SOQL returns records.
  • Records are stored in collection,records are pertaining to single sobject.
  • Search in single Sobject only.Returns records.
  • SOQL use in triggers,apexclasses.
  • Governer Limit for SOQL queries is 100.
SOSL:
  • SOSL returns fields.
  • Records are pertaining to different sobjects.
  • Search in  entire organization,returns fields.
  • SOSL can't use in triggers.
  • Governer Limit for SOQL queries is 20.
Profile vs Permission Sets:

Profile:
  • Profile is a collection of permissions and settings associated with user or group of users.
  • User can have only one profile.
  • profile is mandatory while creating user.
Permission Sets:
  • Permission sets is a collection of settings and permissions that give users access to various tools and functions.
  • The settings and permissions in permissions sets are also found in profiles,but permission sets extend users functional access without changing their profiles.
  • Users can have only one profile,but can have multiple permissions sets.
Standard Controller ,Custom Controller,Controller Extensions:

Standard Controller:
  • Standard Controller is available for all API entities/objects as well as Custom objects.
  • Provides access to standard salesforce data and behavior.
  • Syntax:<apex:page standardcontroller="Account">
Custom Controller:
  • Custom Controller is an apex class that implements all the logic for a page without leveraging the functionality of a standard controller.
  • Are coded to create custom behavior.
  • Syntax:<apex:page controller="c13">
  • If you want to use one or more standard objects in apex class,there is only way to use custom controller.
  • if you use standard controller or extension controller,by default sharing rule is applicable ,so at that time only way is custom controller.
Extension Controller:
  • Any apex class having a public constructor with custom controller or standard controller object as  a single argument is known as controller extension.
  • It is an apex class which adds functionality to existing standard and custom controllers.
  • A visualforce Page can have  multiple controller extensions ,but only one standard or custom controller.
  • syntax:<apex:page standardcontroller="account" extension="hani143">

PageLayouts vs Field-Level Security:

Page Layouts:
  • Controls display of details and edit page.
  • Controls page section customization.
  • Allows you to set field properties.
  • Can be unique for Specific Business.
Field-Level Security:
  • Defines users access to view and edit fields in salesforce.
  • Helps data security.
  • Helps users to  view relevant data.
  • Hides field from user,list view,search,reports.
Partner portal vs Customer Portal:
  • Partner Portal exposes the leads and opportunity objects whereas the customer portal doesn't.
  • Partner  Portal licensing is more than customer portal.
  • Using Customer Portal customers can log cases  and get updates 24/7
  • Partner portal:Outsource your service management by allowing third-party service reps to manage customer cases via the partner portal. Service partners can do everything they need to resolve customer support issues: search the solution database, log cases, make case comments, and run reports.


0 comments:

Post a Comment