View

Wednesday, April 24, 2013

SalesForce Technical Questions.............Part5



1. Difference between Sandbox and Development environment?
2. How to schedule export or take the backup of salesforce?
3. Do governor limits apply to sandbox instances?
Ans : Governor limits do apply to all Salesforce instances (trial, developer, production or sandbox environments). However code coverage and successful execution of test classes is only enforced when deploying to a production environment.
4. What is Roll up summary field in Salesforce?
Ans : Roll up summary field in salesforce calculates the Count, Sum, Min or Max of particular field of any child record. Thus, we can say that Roll up summary field can only be created on Master object.
5. How many types of the relationship fields available in Salesforce>
Ans :
Master Detail
Many to Many
Lookup
Hierarchical
6. How to create many to many relationships between object.
Creating many to many relationship in salesforce is little tricky. You cannot create this type of relationship directly. Follow below steps to create this type of relationship. Create both objects which should be interlinked.
Create one custom object, which should have autonumber as unique identification and create two master relationships for both objects, no need create tab for this object. Now on both object, add this field as related list.
7. If one object in Salesforce have 2 triggers which runs “before insert”. Is there any way to control the sequence of execution of these triggers?
Ans : Salesforce.com has documented that trigger sequence cannot be predefined. As a best practice create one trigger per object and use comment blocks to separate different logic blocks. By having all logic in one trigger you may also be able to optimize on your SOQL queries.
8. How to delete the User from Salesforce?
Ans : As per now, salesforce does not allow to delete any user, however you can deactivate the user.
9. How to delete the users data from Salesforce?
Ans : To delete the Users Data go to Setup | Administration Setup | Data Management |  Mass Delete Record, from there select the objects like Account, Lead etc and in criteria select the users name and delete all records of that user related to particular object.
10. How to restrict the user to see any record, lets say opportunity?
Ans : set up opportunity sharing to be private.  If both users are admins or have view all records on opportunity, then that overrides private sharing.
11. What is the difference between trigger.new and trigger.old in Apex – SFDC?
Ans :
Trigger.new :
Returns a list of 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.
Trigger.old :
Returns a list of the old versions of the sObject records. Note that this sObject list is only available in update and delete triggers.
12. How to restrict any Trigger to fire only once ?


1) How do you hide Header and Sidebar on Visualforce page?
2) What is difference between standard and custom controller?
3) What is Controller extension?
4) How do you read parameter in Visualforce page?
5) How many dependent drop down can be put on one Visualforce page?
6) What is the maximum size of the PDF generated on Visualforce attribute renderAs?
7) How to use actionPoller tag?
8) What is difference between actionFunction and actionSupport Tag ?
9) How can we check the object accessibility on visualforce page?
 -{!$ObjectType.MyCustomObject__c.accessible}
10) How many rows return by list controller?
 -10000
11) What is custom component?
12) What is assignTo attribute and what is its use?

1. What is Apex
Ans: It is the in-house technology of salesforce.com which is similar to Java programming with object oriented concepts and to write our own custom logic.

2. What is S-Control ?
Ans: 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.

3. What is a Visualforce Page ?
Ans: Visualforce is the new markup language from salesforce, by using which, We can render the standard styles of salesforce. We can still use HTML here in Visualforce. Each visualforce tag always begins with “apex” namespace. All the design part can be acomplished by using Visualforce Markup Language and the business logic can be written in custom controllers associated with the Page.

4. Will Visual force still supports the merge fields usage like S-control ?
Ans: Yes. Just like S-Controls, Visualforce Pages support embedded merge fields, like the {!$User.FirstName} used in the example.

5. Where to write Visualforce code ?
Ans: You can write the code basically in 3 ways.
  1. setup->App Setup->Develop->Pages and create new Visulaforce page.
  2. Setup -> My Personal Information -> Personal Information -> Edit check the checkbox development mode. When you run the page like this, https://ap1.salesforce.com/apex/MyTestPage. you will find the Page editor at the bottom of the page. You can write you page as well as the controller class associated with it, there it self.
  3. Using EclipseIDE you can create the Visulaforce page and write the code.

6.What are Apex Governor Limits?
Governor limits are runtime limits enforced by the Apex runtime engine. Because Apex runs in a shared, multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that code does not monopolize shared resources. Types of limits that Apex enforces are resources like memory, database resources, number of script statements to avoid infinite loops, and number of records being processed. If code exceeds a limit, the associated governor issues a runtime exception.

No comments:

Post a Comment

Share your Comments .............