Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
5. When I want to export data into SF from Apex Data Loader, which Option should be enable in
Profile?
------------------------------------------------------------------------------------------------------Enable API
In personal accounts, persons name will be taken as primary considerations where as in business
accounts, there will be no person name, but company name will be taken into consideration.
9. What are formula and Rollup Summary fields and Difference between them? When should RollupSummary field enable?
--------------------------------------------------------------------------------------------------------------------Formula: A read-only field that derives its value from a formula expression that we define. The
formula field is updated when any of the source fields change.
Rollup Summary: A read-only field that displays the sum, minimum, or maximum value of a field in a
related list or the record count of all records listed in a related list.
3 Types:
Configuration
Developer
Full
========================================================================
==============================================================
Q:What is the difference between custom controller and extension?
-----------------------------------------------------------------Ans:A controller extension is an Apex class that extends the functionality of a standard or custom
controller
--------------------------------------------------------------SOQL
----
SOSL
----
Returns Records.
Returns Fields.
SOSL:
1.we don't know in which object or field the data resides
2.we want to retrieve multiple objects and fields efficiently
3.we want to retrieve data for a particular division in an organization using the divisions feature
<APEX:PAGEMESSAGES>
It is used to display all of the messages on a page. that means It will display Salesforce generated
messages as well as custom messages added to the Apex class
<APEX:MESSAGES>
It is similar to apex:message, but it displays all of the errors. These errors are displayed as a list with
no styling
Shallow Clone:
Records from the existing list will not be actually added into the new list but only a reference will be
given
2.Hierarchy settings:
Hierarchy settings allow you to personalize your application for different profiles and/or users
Lookup relationship: This type of relationship links two objects together, but has no effect on deletion
or security.
Customer Portal:
Customer Portal provides an online support channel for customers allowing them to resolve their
inquiries.
Q:What is the difference between With sharing and With out sharing?
-------------------------------------------------------------------with sharing:this keyword defines that sharing rules are enforced to the current user
without sharing: this keyword defines that sharing rules are not enforces to the current user
We can use these two keywords on a class to specify whether or not to enforce the sharing rules.
Q:A custom object contains some records, now my requirement is to create field in this object with
master detail relationship.
Can we create master detail relationship in this case?
-----------------------------------------------------------------------------------------------------------------------------No, directly we cannot create master details relationship if custom object contains existing records.
1.First create field with lookup relationship.
2.And then associate look field with parent record for every record
3. Next change the data type of the field from look up to Master detail.
Q:Does user can create insert their own custom logo, while creating their own custom applications?
---------------------------------------------------------------------------------------------------
Yes user can upload their custom logo in documents and then they choose that logo for organization.
-Workflow is automated process that fired an action based on Evaluation criteria and rule criteria.
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
If we add a user to a role, the user is above in the role hierarchy will have read access.
Setup -> manage users -> roles -> setup roles -> click on add role -> provide name and save.
2.OWD:
Defines the level of access to the user can see the other users record
OWD can be Private, Public Read Only, Public Read and Write.
Setup -> Security Controls -> sharing settings -> Click on Edit
3.Manual Sharing:
We can see this button detail page of the record and this is visible only when OWD setting is private.
If we want to share records based on condition like share records to group of users
Setup -> security controls -> sharing settings -> select the object and provide name and
5.Apex sharing:
Share object is available for every object(For Account object share object is AccountShare ).
If we want to share the records using apex we have to create a record to the share object.
2. Validation rules
Q:What is the maximum size of the PDF generated on visualforce attribute renderAs?
---------------------------------------------------------------------------------15MB
Action support: Invoke the controller method using AJAX when event occurs on page like
onMouseOver, onClick, ect and we can use action support for particular single apex component.
2. Web Service
3. Triggers
4. Email services
Q:How we can change the Grant access using role hierarchy for standard objects?
------------------------------------------------------------------------------Not possible.
Record Types are restrict the pick list values and assign to the different page layouts for different
Record Types.
Q:What is Dashboard?
-------------------Dashboard is a pictorial representation of report. We can add up to 20 reports in single dashboard.
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.
Q:Is it possible to change the existing data types of custom fields, if Yes please explanin?
-------------------------------------------------------------------------------------------Yes. Its possible but Changing the data type of an existing custom field can cause data loss in the
following situations:
Solution
Notes:
Field Level Security is not available in PE
Field-level security cannot be used to make a field required. This is done from the Page Layout
Field access settings can be defined using both field-level security and page layouts. However, the
most restrictive field access setting of the two will always apply. For example, if a field is required on
the page layout, but read-only in the field-level security settings, the field will be read-only.
Hiding a field from a user using FLS also hides that field from list views, search results, and reports.
Access levels:
-Private
-Public Read/Write
-Public Read/Write/Transfer
-Controlled by Parent
-Public Read Only
Role:
Controls the level of visibility that users have to an organizations data
A user may be associated to one role
- You can create up to 500 roles for your organization
Role Hierarchy:
Controls data visibility.
Controls record roll up forecasting and reporting.
Users inherit the special privileges of data shared with users below them in the hierarchy.
Case teams enable full communication and collaboration on solving customer issues. under case tem
we can
Add teams of users to cases
Create a workflow for case teams
Predefine case teams for users
Determine the level of access
- Whenever the evaluation criteria is set to Evaluate the rule when a record is: created, and every time
its edited.
- Whenever the rule is activated.
- Whenever we have pending actions in the workflow queue.
Q:What is Web-to-Case?
Q:What is Email-to-Case?
------------------------ It Automatically create a case when a customer sent a email to case team in organisation.
- Email-to-Case helps organisation to efficiently resolve and correspond with customer inquiries via
email
-Auto response rules help to send quick replies to customers to let them know we have received their
inquiry or issue.
1. Master Detail
2. Many to Many
3. Lookup
4. Hierarchical (It is only available on User Object, we cannot create this relationship to other SFDC
Objects)
Apart from this if we can delete the users data by using 'mass delete record'
Setup-> Administration Setup-> Data Management-> Mass Delete Record
Q:What is difference between WhoId and WhatId in the SFDC Data Model of Task/Events ?
-------------------------------------------------------------------------------------WhoID Lead ID or a Contact ID
WhatID Account ID or an Opportunity ID or Custom Object ID
Q:Can we convert lookup to master detail relationship if yes what must be the condition to convert?
---------------------------------------------------------------------------------------------------- yes,We can convert the lookup relationship to master detail relationship only if all the existing
record has valid lookup field values.
CC:Custom controller defines custom functionalities and we need to define each and every line of
logic. salesforce doesnot provide anything.
Q:If page is having multiple extenssions and if two extenssions have methods of same name.
which method out of these two will be called upon calling from vf page ?
Then
------------------------------------------------------------------------------------------------------------------------------------- The one which is present in the controller defined on the left side will be called because leftmost
extension overrides all the other extensions
------------------------------------------------------------- First of all Visualforce page should be a list controller i.e, it should have "recordsetVar" attribute
defined in page tag.
Q:Can you have more than one extenssions associated with a single page?
-----------------------------------------------------------------------Yes we can have more than extenssions
Q:Is it possible to bypass Grant Access Using Hierarchies in case of standard objects ?
----------------------------------------------------------------------------------------No. This is default and cannot be changed.
By Using pagereference object we can call a visualforce page from controller method.
Q:.Can we have roll up summary fields in case of parent child relationship(lookup relationship)?
---------------------------------------------------------------------------------------------- No. These are present only in case of master details relationship.
Q:What does the error "list has no rows for assignment" mean?
------------------------------------------------------------- it means the list you are trying to access has no values in it .
- Writing select query within for loop may hit the governer limit of 100 select queries.
Q:What is viewState?
-------------------ViewState holds state of the visualforce page that includes the fields, components and controller
.Viewstate data in encrypted and cannot be viewed
view state maximum size is 135KB
A future method runs in the background, asynchronously. We can call a future method for executing
long-running operations,
Q:
Q: IS there any limit on the number of items that can be stored in apex collections?
------------------------------------------------------------------------------------no there is no such kind of limit.
Q: Ho can you display the status of an AJAX update request in a visualforce page ?
---------------------------------------------------------------------------------To display AJAX request status we can use <apex:actionstatus> tag .
Q:How can you implement custom functionality for a standardcontroller visualforce page?
---------------------------------------------------------------------------------------This can be done by associating a controller class with that standard controller using "Extenssions"
Q:Reset security token option is unavailabel in set up. What could be the reason?
---------------------------------------------------------------------------------If in the profile setting "login ip ranges" have been set up then the option of "reset security token" is
uanvailbale.
Q:What are the different data types that a standard field record name can have?
-------------------------------------------------------------------------------ecord name field can have either of the two data types : Auto Number or Text data type.
If you want to do DML operation during VF page loading, use action attrirbute in <apex:page>. Call a
method from the action in which DML operation is allowed.
Q: What are the different access modifiers that can be used with methods and variables?
Apex allows you to use the private, protected, public, and global access modifiers when defining
methods and variables.
While triggers and anonymous blocks can also use these access modifiers, they are not as useful in
smaller portions of Apex.
Q: How many callouts to external service can be made in a single apex transaction?
Q:What is the maximum allowed time limit while making a callout to external service in apex?
-------------------------------------------------------------------------------------------maximum of 120 second time limit is enforced while making callout to external service
Q:How can you expose an apex class as a REST web service in salesforce?
----------------------------------------------------------------------An apex class can be exposed as REST web service by using keyword '@RestResource'
-----------------------------------------------------------------------------------------------------------------
Q. What does it mean when you get the error "too many soql queries 101 salesforce"
----------------------------------------------------------------------Ans: It means you are hitting the limit of 100 soql queries as per governers limit
Q. How can you create a input field for date on a visualforce page ?
------------------------------------------------------------------------------------Ans: To create a input date field on vf page you will have to bind it with a existing date field on any
object.
Q. How can you display different picklist values for picklist fields in different page layouts?
-------------------------------------------------------------------------------------------------------Ans: This can be done using record types.
Ans - Using offset keyword return the records starting from desired location in the list. For example if
we specify offset 8 then all the records starting from location 9 onwards would be returned.
Q.When a lead is converted into account/contact will the trigger on account/contact fire?
---------------------------------------------------------------------------------------------------------------Ans - In set up we can enable or disable whether triggers should run on conversion.
Q. What are the different considerations that must be followed when using @future annotation in apex
method?
------------------------------------------------------------------------------------------------------------------------------------------Ans - 1. Method must be static 2. It must return void and 3. method can have argument of type
primitives,collection of primitives or arrays of primitives .
Q.What is the difference between List type custom setting and Hierarchy type custom setting?
-----------------------------------------------------------------------------------------------------------------------Ans - List type stores static data that can be used in apex code
Hierarchy type stores data that may change depending on user,profile or org wide default.
Q. Can you set default access in Organization wide default for detail objects (detail object in case of
master detail relationship)?
-----------------------------------------------------------------------------------------------------------------------------------
Ans - No, Detail object will always have default access as 'Controlled by Parent' and it cannot be
changed.
Q:Email to Case
--------------By using the Email to Salesforce we can send email notifications to all users in organisation
->visualforce concept allows developers to create new custom user interfaces for applications.
Q:Relational Database:
------------------a database structured to recognize relations between stored items of information
primary key:
-----------A primary key is a table column that can be used to uniquely identify every row of the table
primary key is a unique
foreign key :
------------foreign key is a column it is a copy of a primary key from another table.
foreign key is duplicate and always foreign key depends on primary key.
Primary and foreign keys are fundamental to the concept of relationships because they enable tables to
be related to each other
Q:In Which edition the Apex Data Loader will support? What are those editions?
-------------------------------------------------------------------------------Professional, Enterprise and Unlimited edition supports data loader.
Q:What is MVC?
-------------The main aim of the MVC architecture is to separate the business logic and application data from the
presentation data to the user.
Model: The model object knows about all the data that need to be displayed.
View: The view represents the presentation of the application (User Interface).
Controller: Actual business logic of VF is present here.
Q:As a Developer, how can you optimize SQL query to fetch data from Salesforce Database?
---------------------------------------------------------------------------------------In salesforce datebase the Data of all tenants are store in common table,We only have option to create
SOQL which is optimized by custom inbuilt Force.com
- Determines the best index from which to drive the query, if possible, based on filters in the query
- Determines the best table to drive the query from if no good index is available
Q: Sometimes while deleting record it gives error Object cannot be Deleted. What is the reason for
this kind of error ?
----------------------------------------------------------------------------------------------------This is generic error message prompted by Salesforce many times, which is not well informative. To
get informative message, we can try to delete same record in Developer Console. In Developer
Console Debug log, we will get exact error message.
Example :
Lets say there is one record which is parent of more than 2000 records and grand parent of 5000
records. In such scenario from developer console it gives error something like record cannot be
deleted because it has many associated objects However in User Interface, it will just display that
Object cannot be deleted.
SELECT Id
FROM Account
WHERE CreatedDate > 2005-10-08T01:02:03Z
Q:User Wants to set the starting day in Calendar as Monday instead of Sunday. How to get it
done?
----------------------------------------------------------------------------------------------------Change the user language to English ( United Kingdom ) in Personal information or User record.
While creating record for detail object he selects parent record which is not created by him. What will
happen in this case ?
------------------------------------------------------------------------------------------------------------------------------He will get an error, because in order to add child record user must have edit permission in parent
master record.
----------------------------------------------------------------------Export : It is used to export the Salesforce Data(excluding recycle bins data) into your local system.
Export All : It is used to export the Salesforce Data(including recycle bins data) into your local
system.
Q:What will happen if you try to update record in After Trigger Context?
------------------------------------------------------------------------We will get an error saying record is Read only
Q:In how many ways you can invoke Controllers / Controller Extensions method from VF?
------------------------------------------------------------------------------------Javascript Remoting, ActionFunction, ActionSupport, ActionPoller.
Q:User have all the permissions to see the Dashboard and Source Folder still when he wants to see
dashboard, its not visible. What might be the cause?
---------------------------------------------------------------------------------------------------------------------------------Salesforce User license for Dashbaord running user is different than User wants to access Dashboard
Example Running User license is Salesforce and user trying to access Dashboard is Salesforce
Plateform.
Q:When loading data into date fields such as Opportunity Close Date using the Data Loader, the date
displayed in the application is sometimes one day earlier than the date in the file. What may be the
reason and solution ?
-----------------------------------------------------------------------------------------------------------------------------------
The reason for this is that fields such as Close Date are actually date/time fields. When a date is
loaded without specifying the time, the time is defaulted to 00:00 midnight.
Q:Consider we have overall 90% code coverage however there is one class which have 0% code
coverage. Can we still able to deploy that class on production?
-----------------------------------------------------------------------------------------------------------------------------------Yes. Minimum 1% required for every trigger and there is no such restriction for Apex class.
Q:We have a Time Based Workflow and there is Action scheduled to be executed. If we Deactivate
the workflow, Scheduled actions will be removed from queue or not?
-----------------------------------------------------------------------------------------------------------------------------------Even after deactivation of workflow, its action will be active in queue.
Q:We have Time Based Workflow and there is action scheduled to be executed. Can we delete that
workflow?
---------------------------------------------------------------------------------------------------------If a workflow have any pending time dependent action, then we cannot delete the workflow.
Q:In trigger, lets say we have system.debug() statement after adderror() method. Will system.debug()
be statement executed in Trigger after adderror() method?
-----------------------------------------------------------------------------------------------------------------------------------adderror() method is not error statement rather its normal execution flow and all the statements
written after adderror() will be executed normally.
Q:Consider total 90k records present in Salesforce and you have used the count() method of soql.
What will be output of it?
--------------------------------------------------------------------------------------------------------------------------It will throw an error something like Too many query rows: 50001?, as the record limit in SOQL is
50,000.
Q: Give any scenario when you cannot change the currency field type to numeric type.
-----------------------------------------------------------------------------------When the field is used either in Apex class or trigger.
You cant use COUNT() with an ORDER BY clause. Use COUNT(fieldName) instead.
You cant use COUNT() with a GROUP BY clause ,Use COUNT(fieldName) instead.
COUNT(fieldName)
---------------You can use COUNT(fieldName) with an ORDER BY clause.
You can use COUNT(fieldName) with a GROUP BY clause for API version 19.0 and later.
Q:How to write the Where clause in SOQL when GroupBy is used for aggregate functions?
---------------------------------------------------------------------------------------We cannot use the Where clause with GroupBy for aggregate functions like SUM() instead we will
need to use the Having Clause.
Example : Get all the opportunity where more than one record exists with same name and name
contains ABC.
Q: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.
We can view our existing schema and interactively add new custom objects, custom fields, and
relationships, simply by dragging and dropping.
Bulk API is based on REST principles and is optimized for loading or deleting large sets of data.
We can use it to query, insert, update, upsert, or delete a large number of records
Q:How you write test classes? What are the keywords you used in test classes?
--------------------------------------------------------------------------------------------------To define an Apex method as a 'test method', simply define the method as static and add the keyword
'testMethod'. A test method can be defined in any Apex class. A test method can not be defined in an
Apex
trigger .