Common Interview Questions

1.What is the difference in ISNULL and ISBLANK?
A: Both Determines if an expression has a value and returns TRUE if it does not. IF it contains a value, this function returns FALSE
ISBLANK(expression): The Expression allows both number and text fields.
ISNULL(expression): Here the expression allows only number fields.

2. When we cant add Time dependent action in Workflow rule?
A: We can't add time-dependent actions to a rule if we choose "Every time a record is created or edited" evaluation rule criteria.

3.How to make the record type as a default?
A: By using the profiles.
     Go to the particular profile and by using Record Type Settings we can make the Record Type as a default.

4. How to create many too many relationships between Object?
A: A junction object is a custom Object with two Master-Detail relationships. Using this custom junction object, we can model a "many-to-many" relationship between two objects.

5. How to delete the user from Salesforce?
A: As per now, salesforce does not allow to delete any user, however we can deactivate the user.

6. What is the difference between WhoId and WhatId in the Data Model of Task?
A: WhoId refers to people things. So that would be typically a Lead Id or a Contact Id
WhatId refers to object type things. That would typically be an Account Id or an Opportunity Id

7. How to display Error messages in the Visula Force page?
A: In Apex use below code to create the error message for visualforce.
Apexpages.addMessage(newApexpages.Message(ApexPages.Severity.Error, 'Requierd fileds are missing'));
In visualforce page add below tag where we want to display the error message.
<apex:pageMessage></apex:pageMessage>

8. What is the controller extension?
A: Any apex class having a public constructor with custom controller or Standard Controller object  as a single argument is known as controller extension.

9. How to read the parameter value from the URL  in Apex?
A: Consider that the parameter name is "Test".
 String Test=Apexpages.currentPage().getParameters().get('Test');

10. How to round the double to two decimal placein Apex?
A: Deciaml d=100/3;
     Double ans=d.setScale(2);


                                                       .................Under Construction

Comments

Popular posts from this blog

Page Layouts

SOQL Scenario-1