What are Apex Governor Limits,email templates in Salesforce.com


224. What are the types of email templates available in salesforce.com?
1.     Text
2.     HTML with Letter Head
3.     Custom HTML
4.     Visual force
You can create four different types of email templates:
1) Text – All users can create or change text email templates.
2) HTML with letterhead – Administrators and users with the “Edit HTML Templates” permission can create HTML email templates based on a letterhead.
 3) Custom HTML – Administrators and users with the “Edit HTML Templates” permission can create custom HTML email templates without using a letterhead. You must either know HTML or obtain the HTML code to insert in your email template.
4) Visualforce – Administrators and developers can create templates using Visualforce. Visualforce email templates allow for advanced merging with a recipient’s data, where the content of a template can contain information from multiple records.

225. What is Roll up summary field in Salesforce?

Roll up summary field in salesforce calculates the Count, Sum, Min or Max of particular field of any child record.
226. Can we create Roll up summary fields on child object of a Master-Detail relationship?
No, Roll up summary fields can only be created on the master object of the Master-Detail relationship
227. What will happen if the Account is deleted?
If the Account is deleted then, Contact, Opportunity will also be deleted from Salesforce which are related to that Account.
 228. How many types of the relationship fields available in Salesforce?
There are Four types of the Relationship fields available in Salesforce
1.     Master Detail
2.     Many to Many
3.     Lookup
4.     Hierarchical (It is available only on User Object, we cannot create this relationship)

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

230. Difference between Sandbox and Development environment?
Sandbox

The salesforce.com Sandbox environment is an exact copy of your salesforce.com instance. You can copy your live instance to a sandbox environment (but you have to perform manually from sandbox to developer edition) where you can test any changes, implementations, AppExchangeapps or updates. It can also be your hands-on training environment without risking your live data.
You can either copy your configuration and data into a sandbox environment or just the configuration. It acts exactly like your live instance, but be careful if you have workflow rules or automations because they will work in the sandbox as well.
I know that this sounds wonderful and if you don’t have it, you are dying to know how to get it. The problem is the cost. If you are on Unlimited Edition, then cost is not a problem because it comes included. But for Enterprise, Professional or Group Editions, you have to pay… and the price is hefty; anywhere between 25k-50k per year. For a lot of companies, that is more than they are paying for their live salesforce.com instance. So how do you test salesforce.com without Sandbox?  It is always suggested to develop application in sandbox instance then go for LIVE.
Developer Edition
Developer Edition was an edition created for development of integrations and apps, specifically for the AppExchange. It is also a great tool for testing/training in salesforce.com. What makes this a great tool is the fact that it is free. Anyone can get a Developer Edition of salesforce.com. It is a standard Enterprise Edition with very limited storage space. You cannot copy your configuration or data onto the Developer Edition, but you can customize it to match your instance’s look and feel. Once it is customized, you can use it for training, testing or anything else you want. It takes a little bit of work, but you can make it act and feel just like your live instance. The work is well worth it for the free price.

231. How to schedule export or take the backup of salesforce?

Step by Step Instruction:
Click Setup >Data Management > Data Export > Schedule Export.
Select the desired encoding for your export file. Leaving the default is fine.
Check the Include in export checkbox if you want to include attachments in the export (optional)
Leave the default Replace carriage returns with spaces if you want your export files to have spaces instead of carriage returns.
Select Weekly as the frequency for the exports.
Choose start and end dates. Set the end date to sometime in the distant future such as 20 years from the begin date.
Set the time of day for your scheduled export. The export is put in a job queue and the exact time of the export will depend on the amount of activity in the queue.
You can select the types of data to include in your export. It is best to include all data in your export file. This will make sure all your organizations data is exported.
Click Save.
Points to Remember:
Formula and roll-up summary fields are never included in exports.
Articles are not included from exports.
The export notification email is sent to the email address on file for the user who created the scheduled export. There is no way to indicate another email address. If as an Administrator you want the email to go to another person, have them grant you login access, login as them and schedule the data export.
Important:
Scheduled backup exports of your data are limited to weekly exports.
You have 48 hours from the time you are notified the backup is available to download the backup file.
The email notification for backups goes to the email address in Salesforce of the person logged in who schedules the backup
232. Do governor limits apply to sandbox instances?

Governor limits do apply to all Salesforce instances (trial, developer, and production or sandbox environments). However code coverage and successful execution of test classes is only enforced when deploying to a production environment.

233. What actions can be performed using Workflows?

Following workflow actions can be performed in a workflow:
1. Email Alert:
Email alerts are workflow and approval actions that are generated using an email template by a workflow rule or approval process and sent to designated recipients, either Salesforce users or others. Workflow alerts can be sent to any user or contact, as long as they have a valid email address.
2. Field Update:
Field updates are workflow and approval actions that specify the field you want updated and the new value for it. Depending on the type of field, you can choose to apply a specific value, make the value blank, or calculate a value based on a formula you create.
3. Task:
Assigns a task to a user you specify. You can specify the Subject, Status, Priority, and Due Date of the task. Tasks are workflow and approval actions that are triggered by workflow rules or approval processes.
4. Outbound Message:
An outbound message is a workflow, approval, or milestone action that sends the information you specify to an endpoint you designate, such as an external service. An outbound message sends the data in the specified fields in the form of a SOAP message to the endpoint.
234. How to delete an apex class or trigger in salesforce.com production environment?
In salesforce.com production environment the Del option is not displayed for classes & triggers. Follow the below steps to delete file in production:
•         Go to your sandbox (where you do your Trigger/Class development) and delete the Trigger/Class from there. Also delete the Test Methods that test the Class/Trigger.
•         Go to Eclipse and do a Refresh from Server. This will make the files disappear within Eclipse.
•         Then deploy to Production, ticking Delete next to the files in your Deployment Plan. (For safety, always Deselect All when deploying, then sort by Type. Only then tick which files to deploy, since choosing the wrong ones could cripple Production.)

235. What are governor limits in Salesforce.com?

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 that cannot be handled thereby terminating the request.
For more information please refer to the link:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm
 
236. Which objects can be imported by Import Wizard?

Following objects can be imported using import wizard.
1. Accounts
2. Contacts
3. Leads
4. Solutions
5. Custom Objects

237. What is the difference between Role & Profile in salesforce.com?

Profile:
Profiles are set of permissions and setting which determines the objects, the fields of the object, tabs & apps the user can access. It also determines the page layout & record type accessible to the user. Profile is a required field while user creation.
Role:
Role control the level of visibility/access to organization’s data at the record level. Users at any given role can view, edit & report on data accessible to all the users below them in role hierarchy. Role is not a required field while user creation.
Example:
Let’s take an example of a software company Ajanya.com. It has two profiles Developer & Tester and two roles Trainee & Manager. Let’s consider that Defect is a custom object.
By using Profile we can ensure that Defect can by created only by user with Tester profile and User with Developer profile can only edit the defect description.
By using Roles we can ensure that the user with Profile Developer & Role Manager can view the Defects assigned to user with profile Developer & Role Trainee.

238. What are different portals in Salesforce.com?
Partner Portal:
A partner portal allows partner users to log in to Salesforce.com through a separate website than non-partner users. Partner users can only view & edit data that has been made available to them. An organization can have multiple partner portals.
For partner portal best practices please refer link:
https://ap1.salesforce.com/help/doc/en/partner_portal_best_practices.htm
Customer Portal:
Customer Portal provides an online support channel for customers allowing them to resolve their inquiries without contacting a customer service representative. An organization can have multiple customer portals.  
   
239. What is the use of Salesforce.com Sites?

Force.com Sites enables you to create public websites and applications that are directly integrated with your Salesforce organization without requiring users to log in with a username and password. You can publicly expose any information stored in your organization through a branded URL of your choice. Sites are hosted on Force.com servers and built on native Visualforce pages. You can user authentication to a public site using customer portal.

240. How to import attachments using Data Loader in salesforce?
Please follow the instructions below.

1. Create an AttachmentList.csv file with the following column headers:
•         ParentId - ID of the record to which the attachment should be associated
•         Name - Name of the attachment
•         ContentType - Format of the extension (e.g. .xls, .pdf, etc)
•         OwnerID - ID for the owner of the attachment
•         Body - File path to the Attachment on your local machine (C:\Attachments\FileName.pdf)
2. Log in to the Data Loader.
3. Select the "Insert" command.
4. In the 'Select Sforce Object' step, select the ‘Attachments’ object. This object is not displayed by default hence check the ‘Show all Sforce Objects' checkbox.
5. Choose the AttachmentList.csv file.
6. In the mapping step, map the following fields:
•         Parent ID
•         Name
•         Owner ID
•         Body - Make sure to map the Body column which you created previously with the file extension. This is how you designate the file and location of the attachments to be inserted.
7. Click "OK" to start the upload.

241. What are groups in SFDC and what is their use in salesforce?

Groups are set of users. They can contain individual users, other groups, the users in a particular role or territory, or the users in a particular role or territory plus all of the users below that role or territory in the hierarchy.
There are two types of groups:
•         Public groups: Only administrators can create public groups. They can be used by everyone in the organization.
•         Personal groups: Each user can create groups for their personal use.
You can use groups in the following ways:
•         To set up default sharing access via a sharing rule
•         To share your records with other users
•         To specify that you want to synchronize contacts owned by others users
•         To add multiple users to a Salesforce CRM Content library
•         To assign users to specific actions in Salesforce Knowledge

242. What is the difference between public cloud & private cloud in salesforce? Is salesforce.com a public cloud or private cloud?

Public Cloud: Could services are provided "as a service" over the Internet with little or no control over the underlying technology infrastructure. More than one tenant can use the same resources.
Private Cloud: This also offers activities and functions "as a service" but is deployed over a company intranet or hosted datacenter. This is private product for a company or organization offering advance security.
Salesforce.com: Is a public cloud as it is hosted on salesforce.com data centers and data of more than one tenant resides on same servers.

243. What is the difference between custom controller and extension in salesforce?

Custom Controller: A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Use custom controllers when you want your Visualforce page to run entirely in system mode, which does not enforce the permissions and field-level security of the current user.
Controller extension: A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when:
•         You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit, view, save, or delete.
•         You want to add new actions.
•         You want to build a Visualforce page that respects user permissions. Although a controller extension class executes in system mode, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode. Instead, it executes in user mode, in which permissions, field-level security, and sharing rules of the current user apply.
A controller extension is any Apex class containing a constructor that takes a single argument of type ApexPages.StandardController or CustomControllerName, whereCustomControllerName is the name of a custom controller you want to extend.
Note: Although custom controllers and controller extension classes execute in system mode and thereby ignore user permissions and field-level security, you can choose whether they respect a user's organization-wide defaults, role hierarchy, and sharing rules by using the with sharing keywords in the class definition.

244. What are different kinds of reports?

1. Tabular: Tabular reports are the simplest and fastest way to look at data. Similar to a spreadsheet, they consist simply of an ordered set of fields in columns, with each matching record listed in a row. Tabular reports are best for creating lists of records or a list with a single grand total. They can't be used to create groups of data or charts, and can't be used in dashboards unless rows are limited. Examples include contact mailing lists and activity reports.
2. Summary: Summary reports are similar to tabular reports, but also allow users to group rows of data, view subtotals, and create charts. They can be used as the source report for dashboard components. Use this type for a report to show subtotals based on the value of a particular field or when you want to create a hierarchical list, such as all opportunities for your team, subtotaled by Stage and Owner. Summary reports with no groupings show as tabular reports on the report run page.
3. Matrix: Matrix reports are similar to summary reports but allow you to group and summarize data by both rows and columns. They can be used as the source report for dashboard components. Use this type for comparing related totals, especially if you have large amounts of data to summarize and you need to compare values in several different fields, or you want to look at data by date and by product, person, or geography. Matrix reports without at least one row and one column grouping show as summary reports on the report run page.
4. Joined: Joined reports let you create multiple report blocks that provide different views of your data. Each block acts like a “sub-report,” with its own fields, columns, sorting, and filtering. A joined report can even contain data from different report types.

245. What are different kinds of dashboard component?

1. Chart: Use a chart when you want to show data graphically.
2. Gauge: Use a gauge when you have a single value that you want to show within a range of custom values.
3. Metric: Use a metric when you have one key value to display.
•         Enter metric labels directly on components by clicking the empty text field next to the grand total.
•         Metric components placed directly above and below each other in a dashboard column are displayed together as a single component.
4. Table: Use a table to show a set of report data in column form.
5. Visualforce Page: Use a Visualforce page when you want to create a custom component or show information not available in another component type
6. Custom S-Control: Custom S-Controls can contain any type of content that you can display or run in a browser, for example, a Java applet, an ActiveX control, an Excel file, or a custom HTML Web form\

Salesforce Master Detail Relationship And Look up Relationship

201. While creating new profile for user, which existing profile should be copied?
If the new user is not System administrator then copy from “Standard User” profile.

202. Who can run reports?

Users with permission “Run Report” and access to report folder can only run the report.

203. What is Difference between “Printable View” and “Export Details“button on report?

Printable View:
Formatting, grouping and subtotals are persisted.

Export Details:

Formatting, grouping and subtotals are lost.

204. What is the use of “floating report header”?

If you have long tabular report, you can make the column header visible on each page as you scroll, by enabling floating report headers.

205. How to enable “floating report header”?

Go to “Setup | App Setup | Customize | Report and Dashboard | User Interface Settings“.
Click on checkbox “Enable Floating Report Headers”.


206. Which permission is required to set the running user other than you in dashboard?

“View All Data” in profile.

207. Who can access “drag and drop dashboard”?

User with permission “manage dashboard”.

208. Which type of report can be used for dashboard components?

Summary and matrix report.

209. How many types of dashboard components are available?

Chart, Table, Metric, Gauge, and Visualforce


210. What is the difference between External ID and Unique ID?
External ID

This is a field that usually references an ID from another (external) system. For instance, if the customer has an Oracle Financials system that they will be linking with salesforce.com, it may be easier for them to be able to refer to the Oracle ID of account records from within salesforce. So they would create an external ID in salesforce.com and they would load the Oracle ID into that field for each account. They can then refer to that ID field, rather than the salesforce.com id.


Additionally, if you have an external ID field, the field becomes searchable in the sidebar search. You also can use the upsert API call with the extenal ID to refer to records.
You can have multiple records with the same external ID (though it is not recommended, as it will defeat the purpose of the external id).

External Id available for Text, Number and Email field types
External Id is used in upsert operations.
•         If external id is absent or not matched then insert happens.
•         If external id matched once then record will be updated.
•         If external id is matched multiple times then error occurs.

Unique ID field

This is a setting for the field that will prevent you from using the same value in multiple records for the unique field. So if I create a 5 character text field and make it unique, and I create a record with the value “12345″ it will not be able to create another record with that same value in the unique field. If I try to do so, I will get an error saying that the value is already in use.
Often, External Ids are set with the unique property so that the IDs will be unique to each record.

211. In Profile settings, what is difference between “Modify All Data” and “Modify All”?

Modify All Data: Create, edit, and delete all organization data, regardless of sharing settings.

Modify All: Give Read, Add, Delete permission to selected Object, Create permission is not included in Modify All  permission.

212. Explain Permission sets?

A permission set is a collection of settings and permissions that give users access to various tools and functions. The settings and permissions in permission sets are also found in profiles, but permission sets extend users’ functional access without changing their profiles.

For example, to give users access to a custom object, create a permission set, enable the required permissions for the object, and assign the permission set to the users. You never have to change profiles, or create a profile for a single use case. While users can have only one profile, they can have multiple permission sets.
Permission sets include settings for:
•         Assigned apps
•         Object settings, which include:
•         Tab settings
•         Object permissions
•         Field permissions
•         App permissions
•         Apex class access
•         Visualforce page access
•         System permissions

•         Service providers (only if you’ve enabled Salesforce as an identity provider)


213. What is Master Detail relationship and look up relationship in Salesforce?

Master Detail relationship is the Parent child relationship. In which Master represents Parent and detail represents Child. If Parent is deleted then Child also gets deleted. Rollup summary fields can only be created on Master records which will calculate the SUM, COUNT, MIN, MAX of the Child records.

Look up relationship is something like “has-a” (Containership) relationship, where one record has reference to other records. When one record is deleted then there is no impact on other records.


214. Can we convert the lookup relationship to Master Detail relationship?

We can convert the lookup relationship to master detail relationship if and only if all the existing record has valid lookup field.

215. How to delete the User from Salesforce?
As per now, salesforce does not allow deleting any user; however you can deactivate the user.
216. How to delete Users data from Salesforce?
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.
217. How to restrict the user to see any record let’s say opportunity?
Set up opportunity sharing to be private.  If both users are admins or have view all records on opportunity, then that overrides private sharing.
218. What is difference between WhoId and WhatId in the Data Model of Task ?
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

219. Where is the option of the report for the “Custom Object with related object” and what are the conditions to generate related reports?

If the parent object is the standard object provided by the salesforce like “Account”, “Contact” then the report will be in there section with related custom object.
If both objects are the custom then the report will be in “Other Reports” Sections.

Following are the conditions to get the report of related objects:
•         On both the objects, Reports option must be enabled
•         The relationship between both of them must be “Master – detail relationship”.

220. How you can provide the User Login (Authentication) in Public sites created by Salesforce?

We can provide the authentication on public sites using “Customer Portal”.

221. What is the dynamic Apex?

Dynamic Apex enables developers to create more flexible applications by providing them with the ability to “Access sObject and field describe information”, “Write Dynamic SOQL Queries”, “Write Dynamic SOSL Queries” and “Dynamic DML”.

222. Is it possible to write the Apex code from user Interface?

You can add, edit, or delete Apex using the Salesforce.com user interface only in a Developer Edition organization, a Salesforce.com Enterprise Edition trial organization, or sandbox organization. In a Salesforce.com production organization, you can only make changes to Apex by using the Metadata API, deploy, call, the Force.com IDE, or theForce.com Migration Tool. The Force.com IDE and Force.com Migration Tool are free resources provided by salesforce.com to support its users and partners, but are not considered part of our Services for purposes of the salesforce.com Master Subscription Agreement.

223. When you can’t add Time dependent action in Workflow rule?

You can’t add time-dependent actions to a rule if you choose Every time a record is created or edited.