Header Ads Widget

sfdc interview differences part 2 || sfdc interview questions


sfdc interview differences part1


7.Difference Between Trigger.New and Trigger.newMap in Apex?


Trigger.New
Trigger.newMap
Returns a list of the new versions of the sObject records
Returns a map of IDs to the new versions of the sObject records.
Note that this sObject list is only available in    insert and update triggers, and the records can only be modified in before triggers.
Note that this map is only available in before update, after insert, and after update triggers.
Trigger.newMap dont work for before insert while
Trigger.New works fine for holding all Ids of records while inserting.
Trigger.new returns a list, which are ordered
Trigger.newMap returns a map - which are unordered.



8.Difference between auto-response rules and work flow rules?

auto-response rules
work flow rules

it is designed for Notifications to interested parties
for initial response to a particular case created persion
it runs when record is created or edited 
it runs only when record created
it send many mails when ever criteria matches 
Sends one email based on the first rule entry criteria it matches in a sequence of rule entries.



9.Difference between Interface and Abstract Class?

Interface
Abstract Class
Declare with keyword Interface
Declare with keyword Abstract
It will not contain constructor
It may or may not contain constructor
By default all methods are public abstract methods.
It contains abstract methods and non abstract methods.
It contains only final variables
It contains final variables and instance variables
We can implement multiple interfaces
We can inherit only one abstract class

10.What is difference between Salesforce Enterprise and Partner WSDL?


Salesforce provides SOAP services provide two different WSDL specs name Enterprise and Partner to access the data remotely.

Enterprise WSDL
Partner WSDL
Is strongly typed, the object and its attributes are fixed.
Is loosely typed, the object and its attributes can be variable. 
Contains the metadata about all standard and custom fields and objects.
Does not contain metadata about objects and fields.
Can only be used against your Salesforce instance.
Can be used against many Salesforce.com organizations.

 Takes an array of key-value pairs.

11.Difference between Roles and Profiles

Roles
Profiles
Role hierarchy does not do any of these things
Profile manages the Salesforce.com License, Tabs Settings, Record types, Page layouts, General Settings, Administrator Settings etc
Optional for User creation.
Mandatory for User creation.
Maintain Record level access.
Maintain object level access.
Role is not  Mandatory
Profile is Mandatory
Role helps in opening the records to the users above the Role hierarchy
Profile helps to put restrictions on the Object



12.Difference between Lookup and Master-Detail relationship in Salesforce?

Lookup
Master-Detail
Loosely coupled.     
Tightly coupled.
Parent is not a required field while creating child record.          
Parent is a required field while creating child record.
We cannot create roll-up summary field.
We can create roll-up summary field.
No cascade delete. 
Cascade delete.
1.      We can have maximum 2 master details on an object

1.      We can have maximum 25 lookup on an object.




13. Difference between Lookup Filters and Validation Rules in Salesforce?
Validation rules and lookup filters both are very similar, but offer different advantages.
Use a lookup filter:

You want to improve user efficiency by limiting the number of available options in a lookup search dialog.
You want to improve user efficiency by automating filters on lookup search dialogs that your users manually set.

Use a validation rule:

You’re close to the maximum number of lookup filters allowed.
You must implement a complex business rule that requires you to use a formula. Formulas can reference fields that basic filter criteria can’t reference, such as fields on the parent of the source object. Formulas can also use functions. For example, use ISNEW if the rule should only apply on record creation, or ISCHANGED if the rule should apply when a field changes. 



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


15. What is difference in ISNULL and ISBLANK?

ISNULL:

•Determines if an expression is null (blank) and returns TRUE if it is. If it contains a value, this function returns FALSE.

•Text fields are never null, so using this function with a text field always returns false. For example, the formula field IF(ISNULL(new__c) 1, 0) is always zero regardless of the value in the New field. For text fields, use the ISBLANK function instead.

•Multi-select picklist fields are never null in s-controls, buttons, and email templates, so using this function with a multi-select picklist field in those contexts always returns false.

•Empty date and date/time fields always return true when referenced in ISNULL functions.

•Choose Treat blank fields as blanks for your formula when referencing a number, percent, or currency field in an ISNULL function. Choosing Treat blank fields as zeroes gives blank fields the value of zero so none of them will be null.

•Merge fields can be handled as blanks, which can affect the results of components like s-controls because they can call this function.

•When using a validation rule to ensure that a number field contains a specific value, use the ISNULL function to include fields that do not contain any value. For example, to validate that a custom field contains a value of ’1,’ use the following validation rule to display an error if the field is blank or any other number: OR(ISNULL(field__c), field__c<>1)



ISBLANK:

•Determines if an expression has a value and returns TRUE if it does not. If it contains a value, this function returns FALSE.

•Use ISBLANK instead of ISNULL in new formulas. ISBLANK has the same functionality as ISNULL, but also supports text fields. Salesforce.com will continue to support ISNULL, so you do not need to change any existing formulas.

•A field is not empty if it contains a character, blank space, or zero. For example, a field that contains a space inserted with the spacebar is not empty.

•Use the BLANKVALUE function to return a specified string if the field does not have a value; use the ISBLANK function if you only want to check if the field has a value.

•If you use this function with a numeric field, the function only returns TRUE if the field has no value and is not configured to treat blank fields as zeroes.

16. Difference between rendered, renderAs and reRender in Visualforce page

render - Boolean value (if it is true, it displays the block else it will be hidden)
reRender - ID. Particular block will be refreshed.
renderAs - Display the page as pdf, excel, etc...

Post a Comment

0 Comments