Tuesday 15 January 2019

SFDC Top interview Questions

Difference between Workflow and Trigger
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.

Wrapper Class :
Answer:-A Wrapper class is a class whose instances are collection of other objects. It is used to display different objects on a Visual Force page in same table.

Difference between SOSL & SOQL:
SOQL(Salesforce Object Query Language) Using SOQL we can Search only on one object at a time.
We can query on all fields of any datatype
We can use SOQL in Triggers and classes.
We can perform DML operation on query results.

SOSL(Salesforce object Search Language)
Using SOSL we can search on many objects at a time.
We can query only on fields whose data type is text,phone and Email.
We can use in calsses but not in Triggers.
We cannot perform DML operation on search result

Difference between insert() & Database.insert()
Using insert method we can insert the records but if any error occurs in any record system will throw an error insertion fail and none of the records are inserted.
If we want to execute partially success of bulk insert operation we will use database .insert.

Static Resource:
Using Static Resources we can upload images, zip files, jar files, java script and CSS files that can be referred in a visual force page.
The maximum size of Static Resources for an organization is 250mB.

Java Script using static resource in visualforce page
Using Static Resources we can upload images, zip files, jar files, java script and CSS files that can be referred in a visual force page.
The maximum size of Static Resources for an organization is 250mB.

Ways to share the record
Role Hierarchy:
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.

OWD:
Defines the base line setting for the organization. Defines the level of access to the user can see the other user’s record OWD can be Private, Public Read Only, Public Read and Write. Setup -> Security Controls -> sharing settings -> Click on ‘Edit’

Manual Sharing:
Manual Sharing is sharing a single record to single user or group of users. We can see this button detail page of the record and this is visible only when OWD setting is private.
Criteria Based Sharing rules: If we want to share records based on condition like share records to group of users Whose criteria are country is India. Setup -> security controls -> sharing settings -> select the object and provide name and Conditions and save

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.

To made fields required:
1. While creation of field
2. Validation rules
3. Page Layout level

Role vs Profile
Role is Record level access and it is not mandatory for all users.
Profile is object level and field level access and it is mandatory for all users.

Maximum size of the PDF generated on visualforce attribute renderAs:
15 MB

How many controller can be used in VF page:
Salesforce come under SAAS so, we can use one controller and as many extension controllers.

Difference between ActionSupport & ActionFunction
Action function: Invoke the controller method from java script using AJAX and we can use action function from different places on visual force page.
Action support: Invoke the controller method using AJAX when even occurs on page like onMouseOver, onClick, ect… and we can use action support for particular single apex component.

How many ways we can call apex class
1. Visual force page
2. Web Service
3. Triggers
4. Email services

Transfer Records in profile
If user have only Read access on particular record but he wants to change the owner name of that record, then in profile level Transfer Record enables he can able to change the owner.

Report Types
4 Types of report in Salesforce
Tabular Reports: We can only displays the grand total in the table form.
Summary Reports: It is a detail form of report in which the grouping done based on Columns.
Matrix Reports: It is a detail form of report in which the grouping done based on both Rows and Columns.
Joined Reports: We can join the two or more reports in the single report displayed in the form of blocks.

Dashboard
Dashboard is a pictorial representation of report. We can add up to 20 reports in single dashboard.

Organization Wide Defaults:
Below are the different OWD values Private
If the OWD for an object is set to private, then only the owner, and users above that role in role hierarchy, can view, edit and report on those records
Public Read Only
If the OWD for an object is set to Public Read Only, then all users can view and report on records but they cannot edit them. Only the record owner and the users above that role in the role hierarchy can edit the records
Public Read/Write
If the OWD for an object is set to Public Read/Write, then all users can view, edit and report on all records. But only owner of the record can delete the records.
Public Read/Write/Trfer
This is available only for Case and Lead objects If the OWD for an object is set to Public Read/Write/Trfer then, all users can view, edit, trfer and report on all the records but only owner of the record can delete the records
Public Full Access
This is available only for Campaign object. If the OWD for Campaigns are set Public Full Access then, all users can view, edit, delete and report on all records. No Access, View Only or Use
This is available only for Price Book object. If the OWD for Price Book is set Use then, all users can access the Price Book information and as well as using the Price Book configuration for Opportunities with Products. If the OWD for Price Book is set View Only then, all users can access the Price Book information but not to use that Price Book detail in Opportunities with Products If the OWD for Price Book is set No Access then, it restricts users from accessing information for Price Book and Prices. Controlled By Parent
If the OWD for any object is set as Controlled By Parent, then user can perform an action on the record based on whether they can do the same on the parent record associated with it

Grant Access Using Hierarchy
In Sharing settings, OWD settings, we have a check box Grant Access Using Hierarchies (for both standard and custom objects).
If this check box is checked then it will give automatic access to the user’s data to other users in higher role of salesforce CRM Role Hierarchy.
If this check box is not checked then, only record owner and users granted access by OWD can gain the access.

Difference between Export & Export All in data loader
Export enables user to export all the records for a particular object excluding the records in the recycle bin or soft deleted records.
Export All enables user to export all the records for a particular object including the records in the recycle bin or soft deleted records.

No comments:

Post a Comment

Batch Apex

1. What are transaction limits in apex? Total number of SOQL queries issued1 - 100 Total number of records retrieved by SOQL queries - 50...