225
www.victoriousdigital.in

Salesforce Certification Training & Courses Online - Victorious Digital

Embed Size (px)

DESCRIPTION

Join India's 1st Online Salesforce Classes & Training in India with 100% Placement Assistance at affordable fees. Get all details about online salesforce classes syllabus, course duration, fees, Job sectors etc. SFDC training online is in boom in India.

Citation preview

Page 1: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 2: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Why Salesforce Training & Courses?• Salesforce is a CRM based application built on the Salesforce.com platform. It can manage all the

customer interactions of an organization through different media, like phone calls, site email enquiries, communities, as well as social media.Salesforce handles all the customer relationships, by focusing on the sales, marketing, and support processes. Salesforce.com is getting used by more and more industries. So with increasing usage of SFDC technology which also has exponentially increased more jobs in the market.Salesforce Training & Certification in Online , helps you to transform your professional profile, enable you to help your company prosper immensely, and gives an incredible experience of satisfaction to your customer base. Moreover, Salesforce training and courses also help you as an individual to earn the credentials necessary for your career growth. Even if you hail from a non-developer and non-coding background, it is never too difficult or late to start learning Salesforce based on cloud computing from Best Salesforce Training Institute Online .Learn and experience Salesforce training online by our expert trainer. We teach and provide the best with 100% practical Salesforce training with real-time projects and real-time examples to understand it in better for your future success. Also, you can explicit your doubts regarding Salesforce training with our experienced expert in Salesforce.com so register yourself and gain the best practical knowledge in Salesforce training.We are located in the prime location of Pune to provide you the best Salesforce courses online with a pack of all 19 modules of cloud computing with updated CRM tools plus a bonus of 100% job assistance to direct you to your path with multiple higher and reputed designation under Salesforce training online.Don’t think twice for Victorious Digital for the best Online Salesforce Classes with 75% of practical and 25% of theory classes with real-time projects and real-time examples.

Page 3: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Why We are best Online Salesforce Training Institute

• We are the best Salesforce Institute Online because: Expert Faculty: We have got our certified faculty who is a subject matter expert with 7+ years of experience.

• Complete Course of 19 Modules: We train you in 19 modules in our online salesforce courses that impart deep knowledge on the subject.

• 100% Placement Assistance: After the completion of our salesforce training course, we provide 100% job placement assistance to our students.

• Placement Services: We concentrate on both theoretical and 100% practical at our salesforce training institute/cloud computing training.

• Multiple Batches: We have multiple batches on weekdays and weekends to choose from so that you can join a batch that is suitable to your schedule for Salesforce courses online

• Keep you Updated: We keep you updated on the latest trends to help you be job ready.• Affordable Fees: Spend less money gain more knowledge only one-time payment with a

pocket budget in our Salesforce courses online. Our salesforce (SFDC) training courses fees are affordable.

• Interactive Session: We are providing the 2-way exchange of knowledge & ideas of Salesforce courses between our students and faculty.

• Students from all over India: We have multiple branches of Salesforce training institute online that allow students from all over the city to join our cloud computing courses.

Page 4: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

What is Cloud Computing?

• Paradigm/model that allows On Demand network Access to Shared Computing Resources

• Mananging, Storing, Processing Data Online via Internet

Page 5: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Characteristics

• On Demand Service • Network Access• Shared Resources• More scalability

Page 6: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Delivery Models

• SAAS (Software as a Service)• PAAS (Platform as a Service)• IAAS (Infrastructure as a Service)

Page 7: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

SAAS • On Demand ServicePay per use of application software to users• Independent of platformDon’t require anything to be installed in PC• Runs in a single instance of SoftwareAvailable for multiple end users• CheapResources maintained by vendor• Accessible via web browser

Page 8: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Examples

• Who uses-end users• Gmail• Office 365• Google drive• CRM – Salesforce.com

Page 9: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

PROS and CONS

• Accessible from any platform

• No need to commute(we can work from

anywhere)• Allows Multi tenancy• Best for collaborative

working

• Browsers issues• Internet performance

Page 10: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

PAAS

• Service made with programming language, web server, database

• Like Salesforce Force.com (use of apex language similar to java)

• Build, Compile, Run programs without worrying about Infrastructure

• Manage data, Application Resources

Page 11: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Examples

• Who uses- developers• AWS• Heroku• Force.com

Page 12: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

PROS and CONS

• Cost effective• Faster market for

developers• Easy deployment• Private Public

deployment possible (use of managed package)

• Limited developers• Migration issues

Page 13: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

IAAS

• Computing Architecture , Infrastructure, but all in virtual environment

• Data storage, Virtualization, Servers, Networking

• Mainly handle application, data, runtime, Middleware

Page 14: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Examples

• Who uses – Sys Admins• AWS EC2• Rackspace.com• Gogrid

Page 15: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

PROS and CONS

• Cloud provides the Infra• Scalability• Flexible

• Security Issues• Network & Service

delays

Page 16: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Database

• collection of related data and its metadata organized in a structured format• Database Management System (DBMS)

– is a software that enables easy creation, access, and modification of databases

Page 17: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Salesforce.com Database

• organized collection of objects. • database tables to collect (or store) the

information • information as object in Salesforce.com• table is presented with rows and columns• Salesforce its maintained as Record and Field.

Page 18: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Database Structure

• In Salesforce.com objects are of three types:• Standard Objects: These are the objects that are

pre defined by the salesforce and readily available.• Custom Objects: These are the objects created by

user according to their need .Each custom object has five standard fields (refer Note 2.2.1)

• External Objects: These are the custom objects which are used to map the data stored outside your organization.

Page 19: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Default Standard fields

• ID: This is an index allocated to each object. This value is unique. ID can be of 15 digit (Case sensitive) and 18 digits (Case insensitive)

• Name• Owner• Created Date/ Created By• Last Modified Date/ Last Modified By

Page 20: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Normal excel based vs Relational database

• Relationships define the connection between two objects, and objects are related to each other through the use of common fields.

Page 21: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Types of Relationship

• Relationships associate one object with other object.

• Relationship is always defined on the child object.

• The child object has complete access of the parent. Based on the handling of data deletion, record, ownership, security

Page 22: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Introduction of Primary-Keys & Foreign-Keys (Conceptual Knowledge)

• A Primary key is a column or set of columns that uniquely identifies the record in the table. When a primary key is defined using multiple columns, the data from each column is used to determine whether a record/row is unique. When we defined any column or columns as primary key, there are some constrains which should be satisfied by primary key that is column value should not be null (Null Constrains) and data should be unique (Unique Constrains.)

• A Foreign key is a set of one or more columns in a table that refers to the primary key in another table. Foreign key does not necessary to be always point to primary key, but the basic idea behind foreign key is that any column which is unique to identify that record/row.

Page 23: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

different types of relationships are categorized in to following ways:

• Master Detail• Lookup relationship

Page 24: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Using 2 relationship we can build various relationships in SFDC

• Many to One (Many child objects but one Parent Object)E.g. many metro cities are associated to One Country.

This kind of relationship is represented in four different forms like

• Master-detail• Look Up (Loosely Coupled Relationship)• Self• Hierarchical (only available on User object)

Page 25: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Master-Detail (1: n) — (One Parent Object and Many Child Objects)

• The record of child object gets automatically deleted when we delete the master object.

• To create a child object parent object reference field is required.

• Child object does not have separate sharing but it derives from Parent object, the detail records inherits the sharing and security settings of respective master record.

• The Owner field is automatically set to the owner of its associated master record as owner field is not available at detail side (child object).

Page 26: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• The detail record must have the master detail relationship field on its page layout.

• Administrators select Allow re-parenting option in the master-detail relationship definition to represent child records in master-detail relationship on custom objects.

• Master-detail relationships can be defined on two custom objects.

• One can define this relationship between one custom object and one standard object but in such relationship the standard object cannot be on the detail side of a relationship with a custom object. The data of custom object is displayed on page layout.

• master-detail relationship can’t be created on objects where the User or Lead objects are the master.

Page 27: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Lookup (1: n) • Lookup is also one-to-many relationship but in

this relationship two objects has no effect on deletion or security.

• Child objects are independent• Child object have separate setting• If we delete parent object child object will

remain in system.• Child may or may not have parent.

Page 28: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Self

• In this relationship the object is self-referred. E.g. Add on Card on your credit card

• an object has a lookup with itself, it is a self-relationship. A self relationship creates a tree diagram of the objects. For example, the account has a lookup on himself, called Parent Account.

Page 29: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Hierarchical• This is also (1: N) Lookup relationship • But can only be defined on User object. In this we can

use lookup field to associate one user with other user. • relationship is a special lookup relationship available

only for the user object. It allows users to use a lookup field to associate one user with another that does not directly or indirectly refer to itself. For example, you can create a custom hierarchical relationship field to store each user's direct manager.

Page 30: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Many-to-many Very Very IMP

• master-detail relationships can be used to model many-to-many relationships between any two objects.

• In many-to-many relationship each record of one object is linked with multiple records from another objects and vice versa.

• We need to create custom junction object to create a many-to-many relationship and then master-detail relationship fields, are linked with this objects.

Page 31: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Junction object

• This object is used to create Many-to-Many relationship.

• Salesforce support two relationship master detail and Lookup but both are 1:n that is one-to-many.

• To define many-to-many relationship we need third object and that is called junction object.

Page 32: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Example

• Classroom and Courses• Can have multiple courses in 1 classroom on

different time• Can have 1 course in multiple classroom• To understand this we need a junction object

Course offerings

Page 33: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Junction object Example

• Create 3 custom objects• Classroom fields seats• Course field Fees• Junction Course offerings• Fields start date, enddate

• On course offering have 2 master detail relationship one to classroom and other to Course

Page 34: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Sales Cloud process

• Objects within sales cloud• Lead as prospects• Account• Contact• Opportunity (if required)

Page 35: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 36: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 37: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 38: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 39: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 40: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 41: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 42: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Model

• The model is your database objects in Salesforce. The include the standard Salesforce objects like Leads, Contacts, Accounts, Opportunities etc but it also includes any custom objects you've created. Think of it like this - the "model" represents your data model in terms of MVC.

Page 43: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

VIEW

• The view represents the presentation of the data (i.e. the user interface).

• Pages - While often just called "pages", what we are talking about is Visualforce pages. They are the building blocks of the user interface. Visualforce uses HTML to lay out the appearance of the application interface. Each page is referenced by a unique URL just like a regular webpage. The pages themselves also contain Visualforce Components which can be invoked by simple tags inside the page.

• Components - these are both standard and custom Visualforce Components. Think of them like widgets that you can add to your pages. Once you write the code once, you can reuse it on multiple pages. Components are important because they allow for this reuse. Components can be styled with CSS.

Page 44: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

CONTROLLER

• Controllers are the building blocks of the actual application logic. The controllers are written in Apex code and they end up controlling and enforcing all the business logic. Remember that one of the key design elements of MVC is to separate the logic from the UI. The presentation layer (the view) shouldn't be mixed with a bunch of business logic. Pages interact with the controller through components which shuttle the data and specifies what happens when the user actually interacts with the UI. Salesforce has pre-built controllers for many of the standard actions like View, Edit, Save. If you want to add new behavior though you can extend or build new controllers (custom controllers) in Apex.

Page 45: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

LookUp filter

• To filter the records to a lookup relationship• For example Contact has lookup to Account• Then user would only be able to select the

accounts whose SLA is gold

Page 46: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Roll-up Summary Field

• A roll-up summary field is custom object field which calculates values from related records child records detail records or the records in a related list.

• Roll-up summary field is created to display a value in a master record based on the values of fields in a detail record.

• Roll-up summary can be defined on Master-Detail relationship only.

Page 47: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Types• Assumption child record has fees field of master• Count-count of all child records on master• Sum- field on child for aggregation referred sum of

fees field on child• Min minimum value of fees in all child records• Max maximum value of fees in all child records

• Go to App Setup | Create | Objects and click on New field and Select Roll up summary field.

Page 48: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Type Description

COUNT Totals the number of related records.

SUM Totals the values in the field you select in the Field to Aggregate option. Only number, currency, and percent fields are available.

MIN Displays the lowest value of the field you select in the Field to Aggregate option for all directly related records. Only number, currency, percent, date, and date/time fields are available.

MAX Displays the highest value of the field you select in the Field to Aggregate option for all directly related records. Only number, currency, percent, date, and date/time fields are available.

Page 49: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Formula & Cross Object Formula Field in Salesforce:

• Formula Field is a read only field whose value is evaluated from the formula or expression defined by us. We can define formula field on both standard as well as custom objects. Any change in expression or formula will automatically update the value of formula field.

Page 50: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Return types of Formula Fields

• We can define formula field for 7 types:• Number• Currency• Percent• Date• Date/Time• Checkbox• Text

Page 51: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Cross Object Formula Field• Cross Object Formula Fields are the fields which are based

on a Cross-object formulas.• The cross object formulas are defined on two related

objects and reference merge fields on those objects.• This field is built on child object. It is also known as

Reference formula. We can apply cross-object fields up to 10 levels. Cross-object formulas can reference merge fields from a master object as well as if field is at detail side then it can merge field from a master-detail relationship. Cross Objects formula can also be defined on lookup relationships.

Page 52: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Basic Config

• Pagelayout• Record type• Creation of Profile• Creation of User

Page 53: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Record types

• Record types allow you to offer different business processes, picklist values, and page layouts to different users based on their profiles. Record types can be used in various ways, for example:

• Create record types for Account to differentiate type of account for one business process with another and offer different picklist values for each.

Page 54: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Record types allow you to associate different business processes and subset of pick list value to different users based on their user profile.

• They are used to drive which page layouts users see when viewing records, based on their user profile.

• Benefits of record types:• Tailors user interaction experience to specific business needs.• Allows for easier administration as there are fewer fields to maintain.

• Creating Record Types:• Example to create record types: In this example I am

creating record type for Case object.• Setup->Customize->Object(Account,case

Contact)>Record Type

Page 55: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Pagelayouts• Page Layout• The organization of fields, custom links, and related lists on an object detail or edit

page.• Used to organize UI pages for your users:• – Which fields, related lists, and Custom links a user’s sees.• – Field properties – visible, read-only and required.• – Page section customizations.• NOTE: Establish unique layouts for different business scenarios.• Creating Page Layout:• Following is example to create page layout for case object.• Set Up->Customize->Object(Account,Contact,case)>Page Layout->Click on New

button• Fill Mandatory details• Drag and drop required to the layout and save page layout.

Page 56: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page Layout Assignment

• Go to Record Type or Page Layout and click on Page layout Assignment

• assign page layout to record types based on profiles.

Page 57: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Concept of Dependent Picklist values

• Create two Fields• Customer Type- • Gold Silver platinum Bronze,Diamond• Dependent picklist as Free Services-flight

discount,drinks,Wifi,Lunch free• Gold-has FD ----Silver-Wifi,drinks----Platinum

all----diamond-wifi,lunch,FD---Bronze-drink

Page 58: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Validation Rules• Validation rules verify that the data a user enters in a

record meets the standards you specify before the user can save the record.

• A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of “True” or “False”.

• Validation rules also include an error message to display to the user when the rule returns a value of “True” due to an invalid value.

• rules helps you to improve data quality by preventing users form entering incorrect data.

Page 59: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Validation rules apply to new and updated records for an object

• Even if the fields referenced in the validation rules are not visible on the page layouts, the validation rule still apply and will result in an error message if the rule fails.

• If entered invalid data, it will display the associated error message without saving the record.

• Validation rules don't apply if you create new records for an object with Quick Create.

Page 60: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Rule Name: Validation_on_Account_revenue• “If Industry equal to Banking then annual revenue

should not be null”.• Industry =Banking and AnnualRevenue• Error-Annual Revenue should not null when Industry is

Banking.• Link to practice more

-https://resources.docs.salesforce.com/204/latest/en-us/sfdc/pdf/salesforce_useful_validation_formulas.pdf

Page 61: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Automation processes

• Workflow• Approval Process• Process Builder• Assignment Rules • Auto Response Rules• Web to Lead • Web to Case• Email to Case

Page 62: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

workflow• Workflow lets you automate standard internal procedures and

processes to save time across your org. A workflow rule is the main nfor a set of workflow instructions.

• Workflow rules can help automate the following types of actions based on your organization's processes:

• Tasks: Assign a new task to a user, role, or record owner.• Email Alerts: Send an email to one or more recipients you specify.• Field Updates: Update the value of a field on a record.• Outbound Messages: Send a secure, configurable API message (in

XML format) to a designated listener.

Page 63: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• For example, workflow rules can:• Assign follow-up tasks to a support rep one week after a case is updated.• Send sales management an email alert when a sales rep qualifies a large deal.• Change the Owner field on a contract three days before it expires.• Trigger an outbound API message to an external HR system to initiate the

reimbursement process for an approved expense report.• Each workflow rule consists of:• Criteria that cause the workflow rule to run.• Immediate actions that execute when a record matches the criteria. For example,

salesforce.com can automatically send an email that notifies the account team when a new high-value opportunity is created.

• Time-dependent actions that queue when a record matches the criteria, and execute according to time triggers. For example, salesforce.com can automatically send an email reminder to the account team if a high-value opportunity is still open ten days before the close date.

Page 64: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Scenarios

• Customer Type- = gold email to owner of the account

• When SLA = platinum update field Active as ‘No’ on account.

• Contact phone is =null update contact field phone with any default value(12345677890)

• When customer type is diamond assign task to record owner after 60 minutes of record creation

Page 65: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

To be Continued

• Whenever Opportunity probability is 30%• Update field on Account Customer Priority as

‘High’

Page 66: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Email Template

• Creation • Assigning to workflow Rule

Page 67: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Things to Remember on Workflow Rules

• Update field can only happen from child to parent but not from parent to child

• For eg- when opportunity is edited update filed on account but vice versa is not possible

• Workflow can only fire on same object or related object which has master detail relationship and not applicable for lookup relationship

• You cannot add time-dependent workflow actions with criteria created and every time its edited

Page 68: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Process Builder• The Process Builder is a workflow tool that helps you

easily automate your business processes by providing a powerful and user-friendly graphical representation of your process as you build it. The Process Builder’s simple and powerful design allows you to:Create your processes using a convenient layout with point-and-click efficiency.

• Create your whole process in one place rather than using multiple workflow rules.

• Create processes by collaborating with different teams in your business.

• Stop using Apex code to automate simple tasks.

Page 69: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Criteria

Automated processes in the Process Builder are based on records and consist of:

• Criteria that determine when to execute action groups.

• Immediate and scheduled actions to execute when those criteria are met.

Page 70: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Actions• Create a record• Update any related record—not just the record or its parent• Use a quick action to create a record, update a record, or log

a call• Launch a flow—you can’t schedule this action with workflow• Send an email• Post to Chatter• Submit for approval• The process builder doesn’t support outbound messages, but

we can easily create one with Apex.

Page 71: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Create a record: This will allow you to create new records and set certain field values for the new record.

• Email alerts: IN order to send an email from a process, you must create the email alert. To send an email alert that email should be associated with the same object on which process is started. Email template contains the standard text, list of recipients, and template

Page 72: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Trigger a flow: You can launch a flow from your process to automate complex business processes.

• Post to Chatter: Process builder post to chatter action helps to post information to any user or group chatter feed within Salesforce. The post will appear in the chatter field as if the person who triggered the process had written it. You can reference groups or topics and add merge fields.

• Submit for approval: Only the record that started the process will be submitted. You can’t submit any related records for approval.

• Update records: Update one or more records that are related to the record that started the process. You can update the record with manually entered values or by using the values from related records. We can update records of parent or child whereas workflow only updates same or parent object from the child.

• Quick actions: You must already have global actions or an object specific action created within Salesforce to use these quick actions. You can then select to log a call, send an email, or update a record.

• Process: This action will call another process to another process. For this action, you need to choose process type as it invoked by another process.

Page 73: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Why Process builder?

• Process builder is more flexible in comparison to workflow.In workflow rule can’t update child record, Post to Chatter, auto submits record in the Approval process, invoke an apex or call flows.

Page 74: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Scenario

• On Account when status =‘In progress’• Or customer type =‘Bronze’• Create an Contact which gets attached to

same account with same name as Account

Page 75: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Assignment Rules• Assignment rules are used to automate your organization’s

lead generation and support processes.• Assignment rule are used to assign owner to the records

based on the condition.

• Lead Assignment Rules – Specify how leads are assigned to users or queues as they are created manually, captured from the web, or imported via the lead import wizards.

• Case Assignment Rules – Determine how cases are assigned to users or put into queues as they are created manually, using Web-to-Case, Email-to-Case, the Customer Portal

Page 76: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Self Study • Web to case email to case• Scenario• Account rating is hot assign Case to Tier 1

queue

Page 77: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Auto Response Rules• An auto-response rule is a set of conditions for sending automatic email

responses to lead or case submissions based on the attributes of the submitted record. Applicable leads include those captured through a Web-to-Lead form.

• Applicable cases include those submitted through a:– Self-Service portal– Customer Portal– Web-to-Case form– Email-to-Case message– On-Demand Email-to-Case message

• You can create as many response rules as you like based on any attribute of the incoming lead or case, but only one rule for leads and one for cases can be active at a time.

Page 78: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Auto-response rules and workflow email alerts provide similar functionality. The following table lists some of the differences between workflow alerts and auto-response

rules to help you determine which process to use:TYPE OF PROCESS

DESIGNED FOR RUNS WHEN

SENDS EMAIL TO

NUMBER OF EMAILS SENT

Workflow email alerts

Notifications to interested parties.

A case or lead is created or edited.

Anyone you choose.

Sends one email per email alert. Each workflow rule can have up to:•10 email alerts as immediate actions•10 email alerts per time trigger as time-dependent actions•10 time triggers

Auto-response rules

Initial response to the contact who created a case or the person who submitted the lead on the Web.

A case or lead is created.

Contact on a case or the person who submitted the lead on the Web.

Sends one email based on the first rule entry criteria it matches in a sequence of rule entries.

Page 79: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Auto Response Rule Scenario

• Send Auto Response email to the person who creates web to lead

• Send Auto Response email to the person who creates web to Case and email to case

Page 80: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Escalation Rules

• Escalation rules automatically escalate cases when the case meets the criteria defined in the rule entry.

• You can create rule entries, which define criteria for escalating a case, and escalation actions, which define what happens when a case escalates.

• Reference-https://help.salesforce.com/articleView?id=rules_escalation_create.htm&type=5

• http://www.infallibletechie.com/2013/08/escalation-rule-in-salesforce.html

Page 81: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Web to Lead• Salesforce web to lead is to directly collect capture the

leads form your website and loaded into Salesforce. • This is built in functionality in Salesforce. Nothing you need

to download or install.• Go to “set up” -> Customize -> Leads -> click on web-to-

Lead• we can see web to lead set enabled checkbox is checked.

By default web to lead is enabled in sales force. And default lead creator is owner of the lead creator in Salesforce. By default it will display System Administrator who created Salesforce organization.

Page 82: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Web to Case• customer support requests directly from your company’s website and

automatically generate up to 5,000 new cases a day with Web-to-Case.• Web To Case is a means by which you can post a simple,

unauthenticated web page that allows your customers to submit cases directly to your Salesforce.com instance.

• This means that you can post a public case submission page on your own website with your own branding and styling.

• Web To Case works by generating a snippet of HTML for you. This HTML is an HTML form that you can put on any page.

• When your customer presses Submit, the information on this form is posted directly to a Salesforce.com server, which handles the information, converts it to a case, and redirects the customer's browser back to a page of your choosing

Page 83: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Generate same as Web to lead• Self study

-https://help.salesforce.com/servlet/servlet.FileDownload?file=015300000036A6eAAE

Page 84: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Email -to -Case

• Salesforce can automatically create a case when an email is sent to one of your company's email addresses, such as [email protected].

• This Email-to-Case functionality auto-populates case fields from the content of each email.

• For example, an email subject heading becomes a case subject.

• Your organization can set up Email-to-Case or On-Demand Email-to-Case to efficiently resolve and correspond with customer inquiries via email.

Page 85: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Email-to-Case

• Email-to-Case requires downloading the Email-to-Case agent and setting it up behind your network's firewall.

• Use Email-to-Case if you have a requirement to keep all email traffic within your firewall, and you want to accept email attachments larger than 25 MB from customers.

Page 86: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

On-Demand Email-to-Case

• On-Demand Email-to-Case uses Apex email services to convert email to cases, without you having to download and install an agent behind your network's firewall.

• Use On-Demand Email-to-Case if you are not concerned about keeping email traffic within your firewall and you do not need to accept attachments larger than 25 MB from customers.

Page 87: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Configure email to case

• From Setup, enter email- to - case in the Quick Find box,

then select Email-to-Case.• In the Routing Addresses list, click New.• Enter your routing address settings.• Click Save.• A verification email is sent to the routing email

address you provided.• Click the link in the verification email.• A confirmation page opens in your web browser.• Click the link in the confirmation page to continue

to Salesforce.

Page 88: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Approval Process• Salesforce approval process is an automated process and your organization

can use to approve records in Salesforce, An approval process is combination of steps for a record to be approved and person has to approve it each step. A step can apply to all the records to that object or just record that meets the certain criteria. An approval process also specifies the actions to take when a record is approved, rejected, recalled, or first submitted for approval.

• Simple or multi-step approval processes to automate and enforce the approval of virtually anything in your company.

• Navigate setup -> Create -> Workflow & Approvals -> Approval Processes.• Select Object for the new approval process.• Click on Create New Approval Process and choose Use Standard Setup

Wizard from the drop-down button.• Note: If you want to create a basic approval process with default settings.

Click on Use Jump Start Wizard.

Page 89: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 90: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Scenario

• Opportunities that are probability more than 40% require a CEO approval. Use this example to create a one-step approval process.

• Whenever Account Status = Completed,or Account Customer Type = Platinum Account should follow approval process to submit record to manager of the user submitting the record

Page 91: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Data management

• Import wizard• It is easy to use tool to load Accounts,

Contacts, Leads, Solutions, or Custom Objects.-Load 50,000 records or less.-Prevent duplicates-Doesn’t support all standard object but supports all custom object

Page 92: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Apex Data Loader• Data Loader is a tool or Application used in salesforce to

import and export bulk data. ThroughApex Data Loader we are able to Update, Insert, Delete, Upsert, Export and Export All. Each operation will be different from each other.

• Insert – insertion of new records• Update – Updating existed records.• Upsert – Update and Insertion of records• Delete – Deletion of records.• Export – Extraction of all records.• Export All – It extracts all records from salesforce including

Recycle Bin records.

Page 93: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Advantages

• Is a fully supported salesforce.com product.• Supports import from CSV or export to CSV.• Can be used to import or export more than

50,000 records.• Supports loading from or exporting to a

database• Supports custom relationships for upsert.

Can be run from command line.

Page 94: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• In dataloader settings we should enable ‘insert null values’ checkbox otherwise we can’t insert null values

Page 95: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Bulk API

• The Bulk API is used to upload high volume of data (millions of records).The Data Loader uses the SOAP-based Web Services API by default. To use the Bulk API instead, check “Bulk API” checkbox in apex data loader settings page.When you check Bulk API checkbox, increases the batch (upto 10000 records) which is usually 200 in normal upload.

Page 96: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

External ID• We have account table in Salesforce and account table outside

of the Salesforce (ex: .csv file, sql database).• In Salesforce all the records can be identified with record id and

outside of the Salesforce we can’t recognize records with Salesforce id that is the reason to compare outside table and salesforce table in Salesforce for one of the field we have to enable external ID (we can enable external id for text, number, auto number and email).

• If we enable external id we can compare that particular column with the column which is available in external table. While comparing if the both column values are same then it will update otherwise it will insert.

Page 97: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Types of Salesforce Org

• Sandbox • Production• Deployment process

Page 98: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Different levels of Security• Object level security• The bluntest way that we can control data is by preventing a user from seeing, creating, editing,

and/or deleting CRUD any instance of a particular type of object, like a Position or Review. Object-level access allows us to hide whole tabs and objects from particular users, so that they don't even know that type of data exists.

• On the platform, we set object-level access rules with object permissions on user profiles or permission sets

• Object Level security can be done in the following Sections.• Permission Sets.• Profiles• Permission Sets : In this Permission sets we define the access level of the user. Generally we

determine what a user can do in the applications. These are used to grant additional permission to a user. Profiles : In Object level Security, Profiles are assigned to the user by system administrator. A profile can be assigned to many users where as a user can have only one Profile.

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

Page 99: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Record Sharing

• Object Level Security • Field • OWD• Record Sharing

Page 100: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Field level security

• A variation on object-level access is field-level access, in which a user can be prevented from seeing, editing, and/or deleting CRUD the value for a particular field on an object. Field-level access allows us to hide sensitive information like the maximum salary for a position or a candidate's social security number without having to hide the whole object.

• On the platform, we set field-level access rules with the field-level security.

Page 101: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Record level security

• To control data with a little more finesse, we can allow particular users to view an object, but then restrict the individual object records that they're allowed to see. For example, record-level access allows an interviewer like Melissa Lee to see and edit her own reviews, without exposing the reviews of everyone else on her team.

• On the platform, we actually have four ways of setting record-level access rules:

• Organization-wide defaults sharing settings• Role hierarchies• Sharing rules• Manual sharing• Apex Sharing

Page 102: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Organization wide default• OWD stands for Organization wide defaults. This setting is defined at object

level. OWD defined the default record level sharing for objects. All profiles get at least the privileges defined in OWD. OWD takes three different values –– Private– Public Read only– Public Read-Write– Public Read-Write/Transfer

• To find out what should be set as OWD for an object, first find out which user requires least access to an object. OWD is set based upon this users access requirements.Most restrictive record access is defined using OWD. Access to additional records is made available through Role hierarchy, Sharing rules, Manual sharing, Apex sharing

Page 103: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• 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 recordsPublic 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/Transfer :This is available only for Case and Lead objectsIf the OWD for an object is set to Public Read/Write/Transfer then, all users can view, edit, Transfer and report on all the records but only owner of the record can delete the records

Page 104: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• 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 ProductsIf 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.

Page 105: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Role Hierarchy

• Role Hierarchy allows additional users access to records. A hierarchy of roles is defined based upon access requirements at record level. Each user belongs to a unique role.

• If a role has access to some record, than its parent and ancestors will also have access to this record.

• Roles can be created using the Manager Users menu. • Roles are used to control record access, where as

profiles are used to specify access at object and field level.

Page 106: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Public Group

• Public group consists of users, roles or "roles and subordinates".

• Sharing rule is defined using public groups. Record that match certain condition can be assigned to users in public groups using Sharing Rules.

Page 107: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Manual Sharing (User Managed Sharing)

• Manual Sharing is used to grant one-off access. • Manual sharing can be granted by record owner,

any one above the owner in role hierarchy and System Administrator.

• Manual sharing is used to handle exception cases where access to a particular record needs to be given to a specific user.

• There is a Sharing button on the records page. This is used to provide manual sharing.

Page 108: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Sharing Rules.

• Sharing Rules makes automatic exceptions to organization wide defaults settings for particular users in an organization. Sharing rules can be done by manual sharing, criteria based sharing and Apex managed sharing.

Page 109: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Controlling Access Using HierarchiesGrant Access Using Hierarchies

• Determine whether users have access to records they don’t own, including records to which they don’t have sharing access, but someone below them in the hierarchy does.

• Beyond setting the organization-wide sharing defaults for each object, you can specify whether users have access to the data owned by or shared with their subordinates in the hierarchy.

• For example, the role hierarchy automatically grants record access to users above the record owner in the hierarchy. By default, the Grant Access Using Hierarchies option is enabled for all objects, and it can only be changed for custom objects.

Page 110: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• To control sharing access using hierarchies for any custom object, from Setup, enter Sharing Settings in the Quick Find box, then select Sharing Settings. Next, click Edit in the Organization Wide Defaults section. Deselect Grant Access Using Hierarchies if you want to prevent users from gaining automatic access to data owned by or shared with their subordinates in the hierarchies.

Page 111: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Important points

• Regardless of your organization's sharing settings, users can gain access to records they do not own through other means such as user permissions like “View All Data,” sharing rules, or manual sharing of individual records.

• The Grant Access Using Hierarchies option is always selected on standard objects and is not editable.

• If you disable the Grant Access Using Hierarchies option, sharing with a role or territory and subordinates only shares with the users directly associated with the role or territory selected. Users in roles or territories above them in the hierarchies will not gain access.

• If your organization disables the Grant Access Using Hierarchies option, activities associated with a custom object are still visible to users above the activity’s assignee in the role hierarchy.

• If a master-detail relationship is broken by deleting the relationship, the former detail custom object's default setting is automatically reverted to Public Read/Write and Grant Access Using Hierarchies is selected by default.

Page 112: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• The Grant Access Using Hierarchies option affects which users gain access to data when something is shared with public groups, personal groups, queues, roles, or territories. For example, the View All Users option displays group members and people above them in the hierarchies when a record is shared with them using a sharing rule or manual sharing and the Grant Access Using Hierarchies option is selected. When the Grant Access Using Hierarchies option is not selected, some users in these groups no longer have access. The following list covers the access reasons that depend on the Grant Access Using Hierarchies option.

• These reasons always gain access:• Group Member, Queue Member, Role Member, Member of

Subordinate Role, Territory Member, Member of Subordinate Territory

• These reasons only gain access when using hierarchies:• Manager of Group Member, Manager of Queue Member, Manager

of Role, Manager of Territory, User Role Manager of Territory

Page 113: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Apex Sharing• Apex managed sharing is a type of "Programatic Sharing" which allows you to

define a custom sharing reason to associate with your programatic share. • Standard Salesforce objects support "Programatic Sharing" while custom

objects support Apex managed sharing. More specifically, object shares can be written to both standard and custom objects, however custom sharing reasons can only be defined for shares written to custom objects.apex manage sharing is used for custom objects as we can define apex sharing reason for custom objects. For standard object, apex sharing reason will be “Manual”

• Salesforce create share table for all objects for which OWD is either public read only or Private. For standard object, share table name is table name followed by share word. For example: AccountShare, ContactShare, CaseShareFor custom object, it is followed by __share. For example : For Position__c, share table name is Position__share

Page 114: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Objects on the detail side of a master-detail relationship do not have an associated sharing object. The detail record’s access is determined by the master’s sharing object and the relationship’s sharing setting.

Page 115: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Create share table record using apex

• Share table contains four columns: ParentId, UserOrGroupId, RowCause, AccessLevel.Below is code to create position__share record:

Position__share p = new Position__share();p.parentId = ‘Position Record Id which needs to be shared’;p.userOrGroupId= ‘User id or Group id with which we want to share record’;p.RowCause=’ apex sharing reason defined for custom object, here for position__c’;p.AccessLevel =’access level for record’; //can be Read or Editinsert p;• Note: you cannot update share table record. System only allows insert or

delete of records for share table. So if you have to change access for user, you have create new record and can delete already existing record if you want.

Page 116: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Scenario

• – Account Sharing Example: The Western and Eastern Regional Directors need to see all of the accounts created by each others’ sales reps. You can create two public groups – one that includes the Western and Eastern Regional Director roles and one that includes the Western and Eastern Sales Rep roles. Then create an account sharing rule so that records owned by the Western and Eastern Sales Rep group are shared with the group containing the Western and Eastern Regional Director roles

Page 117: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

What is a report?

• A report is a list of records that meet the criteria you define. It’s displayed in Salesforce in rows and columns, and can be filtered, grouped, or displayed in a graphical chart.

• Every report is stored in a folder. Folders can be public, hidden, or shared, and can be set to read-only or read/write. You control who has access to the contents of the folder based on roles, permissions, public groups, and license types. You can make a folder available to your entire organization, or make it private so that only the owner has access.

Page 118: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Standard Salesforce Reports

• A report represents the relationship between primary objects and its related objects. To represent this relationship report has predefined templates which makes reporting easier. Every report displays only those records which meets the criteria.

• Salesforce has Standard report type as default report type. Standard report type is present for all salesforce standard objects. For custom objects, salesforce automatically create a standard report type using “with”, or “and” relationship.

Page 119: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Custom Salesforce Reports

• The custom report type can be created by selecting the objects of your interest and their relationships. The wizard will give access to all child objects of these selected objects. This type of report can be customize as per user need.

Page 120: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Salesforce Reports Presentation Styles

• Based on the presentation following styles can be used to generate report in salesforce.

• Tabular Report : The basic form of presentation of user data is tabular report. It has simple listing of data without any subtotals. One can use this report if the presentation is simple.

• Summary Report : Summary report is little bit advanced report as compare to tabular report having grouping of information with subtotals.

• Matrix Report : Matrix report has groups of data based on columns and rows. This report can be used to represent comparison between related total with total by row and total by column.

• Join Report : Join report has the more advanced way to represent data. This report will allow you to relate different blocks and show them in single report. Each block has unique attributes like name, filters, columns, data, and summary fields.

Page 121: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Features of the Salesforce Reports• Salesforce Reports is one of the most powerful features to represent business and

easy understanding of the relationship among objects. Every report in salesforce support following features.

• Custom Summary Formula field: User can define formula based on summary report is generated.

• Exception Reports (Cross Filters): These reports are used to show highlight the position where data doesn’t exist. These reports are created using cross filters.

• Custom Summary Formulas: These formulas are used on reports to calculate complex data from summary level.

• Analytical Snapshots: Snapshot captures data at schedule point with respect to time.• Historical Trend Reporting: This will allow you to track your data. This will allow you to

track upto 8 fields on Opportunity object and 3 fields up to custom objects.• Bucket Field: Salesforce allows us to categorize records without using any formula.

This is known as Bucketing. In bucketing user defines the bucket field (or bucket multiple categories) to group report value.

• Condition High-lighting : To highlight field values on summary or matrix reports based on some criteria like value ranges user can apply conditional highlighting. To enable this, report must have custom summary formula or at least one summary field.

Page 122: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Scheduling report for future run : Once you create a new report we can schedule report by using following steps:

• Set the frequency field to run report. It can be any value you want to run the report number of times like Daily, Weekly or Monthly.

• Mention the dates in Start and End fields.• To run the report you must select start time. Click on

Find available options to choose a start time.• To save report schedule click on Save Report Schedule.

Page 123: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

What is a dashboard?• A dashboard is a visual display of key metrics and trends for records in your org. The

relationship between a dashboard component and report is 1:1; for each dashboard component, there is a single underlying report. However, you can use the same report in multiple dashboard components on a single dashboard (e.g., use the same report in both a bar chart and pie chart). Multiple dashboard components can be shown together on a single dashboard page layout, creating a powerful visual display and a way to consume multiple reports that often have a common theme, like sales performance, customer support, etc.

• Like reports, dashboards are stored in folders, which control who has access. If you have access to a folder, you can view its dashboards. However, to view the dashboard components, you need access to the underlying reports as well. You can also follow a dashboard in Chatter to get updates about the dashboard posted to your feed.

• Each dashboard has a running user, whose security settings determine which data to display in a dashboard. If the running user is a specific user, all dashboard viewers see data based on the security settings of that user—regardless of their own personal security settings. For this reason, you’ll want to choose the running user wisely, so as not to open up too much visibility. For example, set the Sales Manager as the running user for a leaderboard for her team. This allows her team members to view the leaderboard for their individual team, but not other teams.

• Dynamic dashboards are dashboards for which the running user is always the logged-in user. This way, each user sees the dashboard according to his or her own access level. If you’re concerned about too much access, dynamic dashboards might be the way to go.

Page 124: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Dashboard is a page layout for visual display of your data. Each dashboard has 1:1 mapping for its component and report. One can clubbed multiple dashboard components to display a single report. The security settings is used to control the visibility of data. These dashboards are dynamic in nature. User can only view their own data as per their settings.

Page 125: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Dashboard components and their usage

• Charts, tables, gauges, metrics are component in dashboard. User can select any of these component to view data.

Page 126: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Chart: Chart is used for graphical presentation of data. Visual force has variety of chart types to represent your data.

• Gauge: This can be used when the single value need to pointed within range of custom values.

• Metric: This used to represent data based on one key value.

• Table: Table is used to show the set of data.

Page 127: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Dashboard Settings

• The dashboard setting option is available next to report setting for tabular reports limited by row.

• Dashboard Running User concept• Each dashboard has a running user, based on security settings

determined by the user the data is display in a dashboard.• To select a dashboard’s running user in Salesforce Classic use

following steps:• Go to Edit a dashboard.• Click the down arrow button next to the View dashboard as• Select a running user setting. It has two options

Page 128: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Run as specified user. In this view all users able to see same data regardless of their personal security settings.

• Run as logged-in user.This type of settings is used in dynamic dashboard and each user can view only their own data

Page 129: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Then select the option “Let authorized users change running user” to enable user with permission to change the running user on the dashboard view page.

• If user has “View My Team’s Dashboards” selection then dashboard as any user below them in the role hierarchy can view dashboard.

• “View All Data” option will allow all users to edit the dashboard and view it as any user in their organization.

• “Enable Other User’s Dashboard” will restrict the access to edit the dashboard. If they have access to it, though that user is not the running user and don’t have “View All Data.”

• Click OK.• View dashboard as field, “running user”.• Click Save.

• For reference read more ------https://success.salesforce.com/answers?id=90630000000hOkpAAE

Page 130: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

What is a report type?• A report type is like a template which makes reporting easier. The report

type determines which fields and records are available for use when creating a report. This is based on the relationships between a primary object and its related objects. For example, with the ‘Contacts and Accounts’ report type, ‘Contacts’ is the primary object and ‘Accounts’ is the related object.

• Reports display only records that meet the criteria defined in the report type. Out of the box, Salesforce provides a set of predefined standard report types. Don’t see all the fields you want? You might need to create a custom report type.

• For example, an administrator can create a report type that shows only job applications that have an associated resume; applications without resumes won't show up in reports using that type. An administrator can also show records that may have related records—for example, applications with or without resumes. In this case, all applications, whether or not they have resumes, are available to reports using that type. An administrator can also add fields from a related object by creating a lookup relationship to that object, allowing for even more reporting possibilities.

Page 131: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 132: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Introduction to SOQL and SOSL

• Salesforce Object Query Language (SOQL) is similar to SELECT statement in SQL (Structured Query Language). Using SOQL one can search the organization specific data. SOQL can be used with Apex, Visualforce and Schema explorer of Force.com IDE. While writing query one have to combine SELECT command with a list of fields to retrieve as well as the conditions for selecting rows.

Page 133: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Syntax

• SOQL -SELECT one or list of fields FROM an Object WHERE (optional block) filtering criteria

• SELCET EmpID, Name FROM Employee WHERE DEPT_NAME = ‘R&D’;

• SOSL- FIND {search term} IN ALL FIELDS RETURNING Account(Name), Contact(Lastname)

Page 134: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Hints when to use SOQL and SOSL :• Use SOQL when you have some basic prior knowledge about the objects and its

data. At other hand when you know which data you want to retrieve from the object. SOQL can be used to retrieve data from a single object or from multiple objects which are related to one another. Using SOQL we can get Count, Sort queries too. SOQL can be used with Salesforce Object Search Language (SOSL) APIs to search your organization’s Salesforce data if you have built your own salesforce custom UI.

• SOSL is a text-based search technique which works on programmed based on search index. Programmers used SOSL when they are not aware about in which object or fields the data has. It retrieves data for a specific term that is inside the field or build search index for multiple terms within field. It is used to retrieve multiple objects efficiently though may not related to each other. It is used to retrieve data from multiple divisions too.

• To increase the performance of searching use SOSL than SOQL as SOSL is faster than SOQL. If you are searching for specific and single term search then SOQL is best option as SOSL combines multiple terms in the single field. Number of fields in search should be minimum because the large number of fields leads to increase in number of permutations, which can be difficult to tune.

Page 135: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Relationship Queries

• Using relationship queries one can retrieve the related object data from the database. There are two types of relationship queries Parent-to- Child and Child-to-Parent. These queries are similar to SQL joins. Relationship queries retrieve some valid relationship path. One can use relationship queries to retrieve object of one type based on criteria applies for other types of object.

• To understand the concept of Parent and child relationship refer the following diagram

Page 136: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 137: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Queries traversing from Child to Parent Object

• For(College_c c:[SELECT Name,University_r.Name, University_c FROM Colllege_c]}

• {• System.debug(‘College Name:’ + c.Name+ ‘University

Name:’+c.University_r.Name);• }• Standard object Account Contact query• Select Id, name,Firstname,lastname,AccountId, Account.Name,

Account.SLA__c,Account.Active__c from Contact • Query on Custom Object• Select id, Name, salary__c, Employee__r.name,

Employee__r.DOB__c from Salary__C

Page 138: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Queries traversing from Parent to Child Object

• For (University_c u:[Select Name, (Select Name from Colleges_r) from University_c]}• {• For(college_c:u.Colleges r)• {• • System.debug(‘University Name :’+u.Name+ ‘College Name:’+c.Name);• } • }• SOQL- custom object inner query • Select Id,name,(Select id, name, salary__C from Salaries__r) from Employee__c• Refer the child relationship name on master detail relationship for inner query of

child objectStandard inner querySelect Id,name,(Select id, name from Contacts) from Account

Page 139: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Aggregate Queries

• Salesforce support aggregate functions like SUM () , MAX(), AVG() etc to perform various operations. Any query that includes an aggregate function returns its results in an array of AggregateResult objects. AggregateResult is a read-only Object and is only used for query results.

• Aggregate functions are more powerful tool to generate reports when you use them with a GROUP BY clause. Any aggregated field in a SELECT list that does not have an alias automatically gets an implied alias with a format expri, where i denotes the order of the aggregated fields with no explicit aliases. The value of i starts at 0 and incremented per aggregated field.

• Order by Name desc• Order by Name Asc• GROUP BY query • Select Count(Id),SLA__c from Account group by SLA__c• Select Id, name,SLA__C from Account order by SLA__C ASC

Page 140: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Introduction to Apex

• Apex is an object oriented, strongly typed programming language, used API supported by Force.com to give transaction control on salesforce platform. Apex supports for online SOQL and SOSL query handling and returns SObjects records. It has built in support for DML and DML exception handling. It is easy to understand and use as the syntax is more similar to Java language

• Apex is used to implement complex business functionality. Apex supports trigger. We can perform complex validation using Apex.

• Note: SObject class is generic class which can be any SFDC object.

Page 141: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Introduction of Collection Types, Loops & DML Statements

• As per other programming languages Apex also have some inbuilt data structures. Collectively it is called as Collection. Apex Collection has four types namely Lists, Sets, Maps and Enumerations. The first element of any collection type is always indexed at location zero.

Page 142: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

List• List:• A list is a sequential collection of elements. It allows

duplicates. Let’s consider the following example to create List of integer

• List<Integer> customList = new List<Integer>();• customList.add(55);• customList.add(56);• customList.get(0);• You can also use the array syntax for lists. For example:• String[] favoriteColor = new List<String>();• favoriteColor[2] = ‘Blue’;

Page 143: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Set

• Set :• A set is another collection type. Unlike List set

is unordered as well as doesn’t allow duplicates.

• Set<String> alpha = new Set<String>{‘p’,’q’,’r’};• alpha.add(‘s’);• System.assert(alpha.contains(‘r’));

Page 144: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Map• Maps:• Maps are collections types which supports key-value

pairs.

• Map<String,String> myStrings = new Map<String,String>{‘AS201’, ‘XYZ’};

• A1,5• A2,8• A3,10• Mystring.get(A2);=8

Page 145: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Loops

• Loops :• Apex supports five types of procedural loops.

Following are the listed loops. All loops allows break and continue statement.

• do{statement} while (condition);• while(condition) statement;• for(initialization; exit condition; increment) statement;• for(variable : array/set) statement;• for(variable : [inline_soql_query]) statement;

Page 146: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Do-While LoopsSimilar to other programming language do-while loop repeatedly executes a block of code till the Boolean condition remains true. Its syntax is:

• Do• {• --code • }while(condition);

Page 147: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• While Loops• The Apex while loop executes a block of code

until a particular Boolean condition remains true. Its syntax is:

• While(condition)• --code• }

Page 148: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• For Loop:• Apex supports three variations of the for loop:• The traditional for loop:• For(init statement; exit condition;

increment/decrement statement){• Code block• }• For(int i=0;i<=10;i++){• }

Page 149: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• The list or set iteration for loop:• For(variable : list_or_set) {• code block; • }• The SOQL for loop:• for (variable/variable list : [soql query statement]) {• Code block;• }• Salesforce piece of code• List<Account> accList = new List<Account>();• accList=[Select id ,Name,SLA__c from Account where SLA__c=‘Gold’];

• For(Account a: accList){• }• For( int a=0; a<=listname; a++){• }

Page 150: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Apex Triggers• Trigger is piece of code that is executes before and after a record is

Inserted/Updated/Deleted from the force.com database.Syntax:Trigger <trigger name> on <Object name> (trigger Events) {// Implement the Logic here}

• Types of Triggers:– Before Triggers– After Triggers

• Before Trigger: Before triggers are used to perform the logic on the same object and specifically we cannot use the DML operation (Insert, update, delete) on these triggers.These triggers are fired before the data is saved into the database.After Trigger: After triggers are used to perform the logic on the related objects and these triggers are used access the fields values that are created by system (Ex: CreatedBy, LasteModifiedBy , Record Id etc..).

Page 151: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Bulk TriggersBy default every trigger is a bulk trigger which is used to process the multiple records at a time as a batch. For each batch of 200 records.Trigger Context Variables:All the trigger context variables are prefixed with “Trigger.” (Ex: Trigger.isInsert, etc..)• isInsert: Returns true if the trigger was fired due to insert operation.• isUpdate: Returns true if the trigger was fired due to update

operation.• isDelete: Returns true if the trigger was fired due to delete operation.• isBefore: Returns true if the trigger was fired before record is saved.• isAfter: Returns true if the trigger was fired after record is saved.

Page 152: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• New: Returns a list of new version of sObject records.

• Old: Returns a list of old version of sObject records.

• NewMap: Returns a map of new version of sObject records. (map is stored in the form of map<id,newRecords>)

• OldMap: Returns a map of old version of sObject records. (map is stored in the form of map<id,oldRecords>)

• Size: Returns a integer (total number of records invoked due to trigger invocation for the both old and new)

• isExecuting: Returns true if the current apex code is a trigger.

Page 153: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

The events we can use in the new trigger and old trigger

Page 154: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Trigger Context Variable considerations:

• Trigger.Old is always readOnly• We cannot delete trigger.new• In before triggers, trigger.new can be used to

update the fields on the same object.• In After trigger, we get run time exception is

thrown when user try to modify the fields in the same object.

Page 155: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Scenarios• Add fields values to account fields while inserting new accounts• Whenever account rating =“Hot” change industry field on account as “Chemicals”• Populate field mobile on account when owner updates account from owner

phone field.• Throw an error whenever the user try to delete the contact which is not

associated to account• Create the object called “Customer Project” and create Status field under this

object with picklist data type (Values=Active, Inactive). Create the relationship between this custom object and Opportunity so that Customer Project is related list to the Opportunity.Create Active Customer project field on Opportunity object (Data Type=Checkbox)‑The logic is when we create Customer Project for an Opportunity with the Status=Active, then Active Customer project check box on the Opportunity Detail page is automaticallychecked.

Page 156: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Create “Sales Rep” field with data type (Text) on the Account Object. When we create the Account record, the Account Owner will be automatically added to Sales Rep field. When we update the Account owner of the record, then also the Sales Rep will be automatically updated.

Page 157: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Create field called “Count of Contacts” on Account Object. When we add the Contacts for that Account then count will populate in the field on Account details page. When we delete the Contacts for that Account, then Count will update automatically.

Page 158: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Future Method• A future method runs in the background, asynchronously. You can call a

future method for executing long-running operations, such as callouts to external Web services or any operation you’d like to run in its own thread, on its own time.

• You can also make use of future methods to isolate DML operations on different sObject types to prevent the mixed DML error. For Example you can't update an account and a user role in a single transaction.

• Each future method is queued and executes when system resources become available.

• That way, the execution of your code doesn’t have to wait for the completion of a long-running operation.

• A benefit of using future methods is that some governor limits are higher, such as SOQL query limits and heap size limits

Page 159: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Syntaxglobal class YourClassName { @future public static void yourFutureMethodName(Set<Id> recordIds) { List<Account> acc = [Select Id, Name from Account Where Id IN :recordIds]; // process account records to do awesome stuff }}

Page 160: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Methods with the future annotation must be static methods• can only return a void type• The specified parameters must be primitive data types, arrays of primitive data types,

or collections of primitive data types• https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon

_apex_primitives.htm• Methods with the future annotation cannot take sObjects or objects as arguments.• You can invoke future methods the same way you invoke any other method. However,

a future method can’t invoke another future method• No more than 50 method calls per Apex invocation• Asynchronous calls, such as @future or executeBatch, called in a startTest, stopTest

block, do not count against your limits for the number of queued jobs• To test methods defined with the future annotation, call the class containing the

method in a startTest(), stopTest() code block. All asynchronous calls made after the startTest method are collected by the system. When stopTest is executed, all asynchronous processes are run synchronously

Page 161: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

When to use Future Method:• If you want to make the execution of the apex program to

run asynchronously then we make use of future method.• When you specify

future , the method executes when Salesforce has available resources.

• For example, you can use the future annotation when making an asynchronous Web service callout to an external service.

• To avoid governor limits

Page 162: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

public class FutureApexWebserv { @InvocableMethod public static void sendContacts(List<Contact> conList) { string jsonData = JSON.serialize(conList); sendContactsToOracle(jsonData); } @future(callout = true) public static void sendContactsToOracle(string jsonData) { HttpRequest req = new HttpRequest(); HttpResponse res = new HttpResponse(); Http http = new Http(); req.setEndpoint('https://enq73h0wpn90ftm.m.pipedream.net'); req.setMethod('POST'); req.setHeader('Authorization', 'Authorization Header'); req.setHeader('Content-Type', 'application/json'); req.setBody(jsonData); req.setCompressed(true); res = http.send(req); }

}

Page 163: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Important-

• The reason why sObjects can’t be passed as arguments to future methods is because the sObject might change between the time you call the method and the time it executes.

• In this case, the future method will get the old sObject values and might overwrite them. To work with sObjects that already exist in the database, pass the sObject ID instead (or collection of IDs) and use the ID to perform a query for the most up-to-date record. The following example shows how to do so with a list of IDs

Page 164: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

FUTURE METHOD CONSIDERATIONS

• Remember that any method using the future annotation requires special consideration because the method does not necessarily execute in the same order it is called.

• Future methods don’t have any execution order• Methods with the future annotation cannot be used in Visualforce controllers in

either getMethodName or setMethodName methods, nor in the constructor.• You cannot call a method annotated with future from a method that also has

the future annotation. Nor can you call a trigger from an annotated method that calls another annotated method.

• The get Content and get Content As PDF Page Reference methods cannot be used in methods with the future annotation

• Consider using Batch Apex instead of future methods to process large number of records asynchronously. This is more efficient than creating a future request for each record.

Page 165: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Batch Apex

• Batch Apex is asynchronous execution of Apex code, specially designed for processing the large number of records and has greater flexibility in governor limits than the synchronous code.

Page 166: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

When to use Batch Apex?• When you want to process large number of records on

daily basis or even on specific time of interval then you can go for Batch Apex.

• Also, when you want an operation to be asynchronous then you can implement the Batch Apex. Batch Apex is exposed as an interface that must be implemented by the developer. Batch jobs can be programmatically invoked at runtime using Apex. Batch Apex operates over small batches of records, covering your entire record set and breaking the processing down to manageable chunks of data.

Page 167: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• batch that runs against 10,000 Accounts will actually be run in 50 separate execute() transactions, each of which only has to deal with 200 Accounts. Governor limits still apply, but only to each transaction, along with a separate set of limits for the batch as a whole.

Page 168: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Database. Batchable interface has the following three methods that need to be implemented −

• Start• Execute• Finish

Page 169: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Start

• This method will be called at the starting of the Batch Job and collects the data on which the Batch job will be operating.

• Use the Database.QueryLocator object when you are using a simple query to generate the scope of objects used in the batch job. In this case, the SOQL data row limit will be bypassed.

• Use the iterable object when you have complex criteria to process the records. Database.QueryLocator determines the scope of records which should be processed.

Page 170: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Start – Use this to basically collect the records and then pass on to execute methodExecute- Use this to process the records.Finish – Called once, when processing get finished and can be used for operations like sending confirmation email

Page 171: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Execute

• where, list<sObject< is returned by the Database.QueryLocator method.

• This method gets called after the Start method and does all the processing required for Batch Job.

• global void execute(Database.BatchableContext BC, list<subject> scope) {}

Page 172: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Finish

• This method gets called at the end and you can do some finishing activities like sending an email with information about the batch job records processed and status.

• global void finish(Database. Batchable Context BC) {}

Page 173: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

ExampleGlobal class batchAccountUpdate implements Database.Batchable<sObject> {

Global Database.QueryLocator start(Database.BatchableContext BC) {

String query = ‘SELECT Id,Name FROM Account’;return Database.getQueryLocator(query);}Global void execute(Database.BatchableContext BC, List<Account> scope) {for(Account a : scope) {a.Name = a.Name + ‘Updated’;}update scope;}

Global void finish(Database.BatchableContext BC) {AsyncApexJob a = [SELECT Id, Status, NumberOfErrors,JobItemsProcessed,TotalJobItems, CreatedBy.EmailFROM AsyncApexJob WHERE Id =:BC.getJobId()];String UserEmail = ‘Any EMAIL’;Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();mail.setToAddresses(new String[] {UserEmail});mail.setReplyTo(‘ANY EMAIL’);mail.setSenderDisplayName(‘Batch Processing’);mail.setSubject(‘Batch Process Completed’);mail.setPlainTextBody(‘Batch Process has completed’);Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });}}

Page 174: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

How to run Batch Process:

• In order to run batch process, you need to useDatabase.executeBatch() method.Open the developer console and then write a small snippet of apex code as shown below

•batchAccountUpdate batchJob = new batchAccountUpdate();Database.executeBatch(batchJob,200);

Page 175: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Scheduling Batch Process:• We can also schedule batch apex. In order to schedule batch

class,we need to write schedulable batch class.• Example:

Global class batchAccountUpdateSchedular implements Schedulable{Global void execute(SchedulableContext sc){batchAccountUpdate b= new batchAccountUpdate();Database.executebatch(b);}}Now you can schedule this apex class by using Schedule Apex in Salesforce

Page 176: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Queueable Apex• Queueable Apex is similar to future methods, but provide additional job

chaining and allow more complex data types to be used.• Queueable Apex allows you to submit jobs for asynchronous processing similar

to future methods with the following additional benefits:Non-primitive types: Your Queueable class can contain member variables of non-primitive data types, such as sObjects or custom Apex types. Those objects can be accessed when the job executes.

• Monitoring: When you submit your job by invoking the System.enqueueJob method, the method returns the ID of the AsyncApexJob record. You can use this ID to identify your job and monitor its progress, either through the Salesforce user interface in the Apex Jobs page, or programmatically by querying your record from AsyncApexJob.

• Chaining jobs: You can chain one job to another job by starting a second job from a running job. Chaining jobs is useful if you need to do some sequential processing.

Page 177: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Syntax

• public class AccountQueueableExample implements Queueable {

• public void execute(QueueableContext context) {

• • }• }

Page 178: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• public class AccountQueueableExample implements Queueable {• public List<Account> accList ; • public AccountQueueableExample(List<Account> accs){• this.accList = accs ; • }• public void execute(QueueableContext context) {• for(Account a :accList){• a.Description ='Updated from AccountQueueableExample ';• }• update accList;• • }• }

Page 179: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• List<Account> accList =[Select Id , Name,Description from Account ];

• ID jobID = System.enqueueJob(new AccountQueueableExample(accList));

• System.debug('jobID'+jobID);

Page 180: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Things to Remember• Queueable Apex is a great new tool but there are a few things to watch out for:•

The execution of a queued job counts once against the shared limit for asynchronous Apex method executions.

• You can add up to 50 jobs to the queue with System.enqueueJob in a single transaction.

• When chaining jobs, you can add only one job from an executing job with System.enqueueJob, which means that only one child job can exist for each parent queueable job. Starting multiple child jobs from the same queueable job is a no-no.

• No limit is enforced on the depth of chained jobs, which means that you can chain one job to another job and repeat this process with each new child job to link it to a new child job. However, for Developer Edition and Trial orgs, the maximum stack depth for chained jobs is 5, which means that you can chain jobs four times and the maximum number of jobs in the chain is 5, including the initial parent queueable job.

Page 181: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Visualforce Pages

• Visualforce is markup language that allows to define user interface components in Salesforce. This is very interesting tool which runs o force.com platform. By using page layouts, we can easily configure User interface. But by using visusalforce pages, you can develop your own customized user interface.

Page 182: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• In VisualForce page we can write the HTML, CSS, and JavaScript etc…

• Each visual force is page that contains the tags/components and controllers.

• Each tag contains attributes and attributes defines the properties of the tag.– By default each tag has two attributes.

• ID: – Id is used to bind the two components together.• Rerendered: – Used to show/hide the component.

– Controllers: –• Standard Controller: –• Custom Controller/Controller• Extension Controller

Page 183: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Where to use Visualforce Page

• Visualforce pages can be used to• – Override standard buttons, such as New button for

accounts, save button for contacts….etc..• – To override custom tabs, to create vf tabs• – Embed components in detail page layout.• – Create dashboard components on custom help pages• – Customize, extend on integrate the sideboards in the

service cloud console(custom console components)

Page 184: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Controllers• Standard Controller• StandardController objects reference the pre-built Visual Force controllers

provided by salesforce.com. The only time it is necessary to refer to a StandardController object is when defining an extension for a standard controller. StandardController is the data type of the single argument in the extension class constructor.

• Standard Controller is used for customization of both standard and custom objects.

• Controller• Controller is an apex class which is used to implement all the logic of

VisualForce page without leveraging the standard functionality.• Extension Controller• Extension is an apex class used to extend or add the functionality to standard

or custom controllers.

Page 185: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

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

Page 186: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

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

Page 187: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

With Sharing• With sharing Keyword: This keyword enforces sharing rules

that apply to the current user. If absent, code is run under default system context. Use the with sharing keywords when declaring a class to enforce the sharing rules that apply to the current user. Use With Sharing when the User has access to the records being updated via Role, Sharing Rules, Sales Teams – any sort of sharing really.

• Example:• public with sharing class sharingClass {• // Code here• }

Page 188: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Without Sharing• Without sharing keyword: Ensures that the sharing rules of the

current user are not enforced. Use the without sharing keywords when declaring a class to ensure that the sharing rules for the current user are not enforced. For example, you may want to explicitly turn off sharing rule enforcement when a class acquires sharing rules when it is called from another class that is declared using with sharing. Without Sharing is reserved for cases where the User does not have access to the records, but there is a need to update them based on user input.

• public without sharing class noSharing {• // Code here• }

Page 189: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Points to Remember• The sharing setting of the class where the method is defined is applied, not of the class

where the method is called. For example, if a method is defined in a class declared with with sharing is called by a class declared with without sharing, the method will execute with sharing rules enforced.

• If a class isn’t declared as either with or without sharing, the current sharing rules remain in effect. This means that the class doesn’t enforce sharing rules except if it acquires sharing rules from another class. For example, if the class is called by another class that has sharing enforced, then sharing is enforced for the called class.

• Both inner classes and outer classes can be declared as with sharing. The sharing setting applies to all code contained in the class, including initialization code, constructors, and methods.

• Inner classes do not inherit the sharing setting from their container class.• Classes inherit this setting from a parent class when one class extends or implements

another.

• https://pritamshekhawat.wordpress.com/2015/07/13/with-sharing-without-sharing-keywords-in-apex/

Page 190: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

VF Scenarios

• Create page for Account with buttons• Vf Page to create account record with

standard controller• Vf Page to create account record with custom

controller• Vf page to create account with contact using

standard controller with extension

Page 191: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Test Class• In SFDC, the code must have 75% code coverage in order

to be deployed to Production. This code coverage is performed by the test classes. Test classes are the code snippets which test the functionality of other Apex class.@isTest private class MyTestClass {

@isTest static void myTest() { // code_block}

}

Page 192: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Methods used in Salesforce Test Classes:• Test.startTest() and Test.stopTest()• StartTest() – Marks the point in your test code when your test actually begins. Use this method when you are

testing governor limits.• public static Void startTest()

StopTest() – Marks the point in your test code when your test ends. Use this method in conjunction with the startTest method.

• public static Void stopTest()• The startTest method marks the point in your test code when your test actually begins. Each test method

is allowed to call this method only once. • All of the code before this method should be used to initialize variables, populate data structures, and so on,

allowing you to set up everything you need to run your test. • Any code that executes after the call to startTest and before stopTest is assigned a new set of governor limits.• The startTest method does not refresh the test context: it adds a context to your test. For example, if your class

makes 98 SOQL queries before it calls startTest. The first significant statement after startTest is a DML statement. The program can now make an additional 100 queries. Once stopTest is called, however, the program goes back into the original context and can only make 2 additional SOQL queries before reaching the limit of 100

Page 193: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• All asynchronous calls made after the startTest method are collected by the system. When stopTest is executed, all asynchronous processes are run synchronously

• System.Assert:• It accepts two parameters: First one (mandatory) is the condition test and the second one is used to display a message in case the

condition fails.Syntax: System.assert(var1 == var2,”msg”)• System.AssertEquals:• It accepts three parameters; the first two (mandatory) are the variables that will be tested for equality or inequality. The third

(optional)one is used to display a message in case the condition fails.Syntax: System.assertEquals(var1, var2,”msg”);

• System.runAs()• All Apex code runs in system mode, where the permissions and record sharing of the current user are not taken into account. The

system method runAs enables us to write test methods that change the user context to an existing user or a new user so that the user’s record sharing is enforced. The runAs method doesn’t enforce user permissions or field-level permissions, only record sharing. The following items use the permissions granted by the user-specified with runAsrunning as a specific user: Dynamic Apex Methods using with sharing or without sharing

• Shared recordsThe original permissions are reset after runAs completes.The runAs method ignores user license limits.

• Test.isRunningTest()• The Test.isRunningTest() method is used to identify if the piece of code being executed is invoked from a Test class execution or

other artefacts such as a Trigger, Batch Job etc. Returns true if the code being executed is invoked from a test class otherwise, returns a false.Example:Performing web service callouts in Apex are not supported within Test Code. Hence we could use the Test.isRunningTest() to conditionally identify and route the execution of a code block that calls the Test Mock framework to simulate mock, callout response.

Page 194: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Test.loadData()• Using the Test.loadData method, you can populate data in your test methods without writing any

code lines. Follow these steps:• Add the data in a .csv file.• Create a static resource for this file.• Call Test.loadData within your test method and passing it the sObject type token and the static

resource name.• For example, for Account records and a static resource name of myResource, make the following

call:• List<sObject> ls = Test.loadData(Account.sObjectType, 'myResource');The Test.loadData method

returns a list of sObjects that correspond to each record inserted.• You must create the static resource before calling this method. The static resource is a comma-

delimited file ending with a .csv extension. The file contains field names and values for the test records. The first line of the file must contain the field names, and subsequent lines are the field values. To learn more about static resources, see “Defining Static Resources” in the Salesforce online help. Once you create a static resource for your .csv file, the static resource will be assigned a MIME type. Supported MIME types are:

• text/csv• application/vnd.ms-excel• application/octet-stream• text/plain

Page 195: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Unit Tests to be Done for?• we have to write test classes for below items/components in salesforce.• Apex Trigger• Apex Class – Handler/Helper, WebService, Apex REST, SOAP• VF Page• Apex Batch/Queueable/Future Method• Custom Controller• Where to Write Test Class• You can use any of below tools to write test classes• Developer console• Salesforce UI , setup -> apex classes ->create/open existing test class• Visual studio code• Any IDE tool.

Page 196: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Salesforce Communities:

• Salesforce Communities are very useful for employees, customers and partners to connect in one place. We can create and customize communities according to our requirement. Communities was released in summer’ 13 release.

• You can collaborate and communicate with people outside of your company who are key to business. We can easily communicate with internal users and portal users and external users.

• We can create multiple communities in an organization. For example for partner support you can create one community and for customer support you create one more community. Like based on your business need you can create multiple communities.

Page 197: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Salesforce Communities are useful to:• – Drive more sales by connecting your employees with your distributors,

resellers, and suppliers• – Deliver world-class service by giving your customers one place to get

answers• – Manage social listening, content, engagement, and workflow all in one place• Here in this post I will explain you how to enable community and how to create

communities.• How to enable community in Salesforce?• To enable community in Salesforce go to setup -> Build -> Customize ->

Communities and click on settings. and check enable communities check box and enter your domain name and save it.

• Note: You cannot change your domain name once you save it. This domain name will be used in all of your communities.

Page 198: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Check availability button is used to, the domain entered by you is available or not

Page 199: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Once communities is enabled new header will be enabled in your salesforce org, there you can swipe between multiple communities. See the below screen for reference.

Page 200: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Now communities are enabled. We will see how to create communities.

• How to create communities in salesforce?• To create communities go to setup -> Build -> Customize ->

Communities -> Manage Communities -> and click on New communities button . And enter name, description and url and click on create button.

• How to manage community?• Once community is created, that is only visible to only

administrators until you publish it or share the URL. After creating the community you will navigate to following screen.

Page 201: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Page 202: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Click on EDIT button to manage the community you just created. After clicking on edit you will be navigate to below screen.

Page 203: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Members is used to add members to the community.• Tabs & pages button is used to manages Which tabs are available to the

community and overriding home page with visualforce page.• Branding button is used add header, footer and to change colors.• Login Page button is used to add logo to your community and also we can

define login options for external users.• Email button is used to specify sender email to notifications, chatter email

branding and email templates.• Miscellaneous button is used to flagging contents, enable private messages and

enable knowledgeable people on topics.• Once you defined all your community settings you can publish your community.• How to add members to your salesforce communities?• Based on the profiles and permission sets we can add members to the

Salesforce communities.

Page 204: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

To add members to your Salesforce communities go to Setup -> Build -> customize -> Community -> manage community -> and edit your community and click on Members and add profiles or permission sets you want give access to community.

See the below screen for reference.

Page 205: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Lightning (Salesforce Lightning)

• Lightning (Salesforce Lightning) is a component-based framework for app development from Salesforce.com that is designed to simplify processes for business users, who typically do not have programming experience.

Page 206: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Lightning Features• Experience, a graphical user interface (GUI) that is optimized for speed.• Lightning App Builder, which provides drag and drop capacities to

facilitate app creation and customization.• Lightning Component Framework, which includes tools and extensions

that enable the development of reusable components and standalone apps and customization of the Salesforce1 Mobile App.

• A Javascript framework for creating single page applications and Lightning Components.

• Design System, A CSS framework and component library for building Lightning styled apps.

• Lightning Connect, an integration tool that makes it easier for Force.com apps to consume data from any external source that conforms to the OData specification.

Page 207: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Lightning Components Framework• Lightning Components is a UI framework for developing web

apps for mobile and desktop devices. It’s a modern framework for building single-page applications with dynamic, responsive user interfaces for Lightning Platform apps. It uses JavaScript on the client side and Apex on the server side.

Page 208: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Lightning Config

• Lightning Record Pages• Lightning Home Page• Lightning App• Lightning Components

Page 209: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Scenarios

• First component with default message in lightning input

• Create lightning component to display current user details

• Create Lightning component to display account details of any particular account eg. ‘Express Logistics and Transport’

Page 210: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Lightning Data Service• We built Lightning Data Service (LDS) to serve as the data layer for Lightning. LDS

is the Lightning Components counterpart to the Visualforce standard controller, providing access to the data displayed on a page. Without LDS, each component within an app makes independent calls to the server to perform CRUD operations on a record, even if all components in the app pull from the same record data. Each server call reduces performance, leaving users twiddling their thumbs instead of working with their data. These independent server calls can also lead to inconsistencies, creating situations where a server call refreshes one component, leaving other components out of date.

• Lightning Data Service identifies and eliminates requests that involve the same record data, sending a single shared data request that updates all relevant components. Not only does this eliminate inconsistent data between components, it also provides a way to cache data to work offline in case the user gets disconnected, intelligently syncing the data once the connection is restored.

Page 211: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Display, create, or edit records lightning:recordForm

Display records only lightning:recordViewForm (with lightning:outputField)

Create or edit records only lightning:recordEditForm (with lightning:inputField)

Display, create, edit, or delete records with granular customization

force:recordData

Page 212: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Scenario

• Create Account Record using LDS• Navigate to record Account created• Override new button on account with custom

lightning component created• Create action button to update existing record

using LDS same component created above• Add showtoast to provide user friendly

message

Page 213: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Create Account and Contact lightning component

Page 214: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Lightning best practices• Avoid Server Trips• Most obvious idea to improve Lightning Component Performance is to avoid server trips.

Let’s say, you need to know the queue Id to be assigned as owner in Case and also need custom setting information to derive the behavior of Lightning Component. There are two ways to achieve this – Call Apex Controller two times vs return combined results from Apex in single call and process JSON in client side controller of Lightning Component.

• 2. Use Storable Action• In this approach, Lightning component shows cached result instead of making immediate

server trip. Lightning component will make server (Apex) call in background and if cached result is stale, then it would cache and refresh the lightning component. This is very useful for devices which has slow internet connections. If you are Facebook or Google News user, you would be easily relate it. When we open these apps, it shows previous feed and if there are new feeds, it gives us option to refresh view or automatically refresh it. All you have to do is, on client side controller of Lightning component, mark action as storable using this code action.setStorable(). This blog post explains working of storable action in detail.

Page 215: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• 3. Use Lightning Data Service• In my previous post around year back, I talked about Lightning Data

Service which is equivalent to Standard Controllers for Lightning Component. You don’t need to write Apex, Test classes for your Lightning Component. However, Lightning Data Service needs more recognization instead of just saying we don’t need to write Apex. Other important side of Data Service is its ability to use shared cache. You can read more about Lightning Data Service in this Trailhead module.

• 4. Custom Cache• If Lightning Data Service and Storable Action is not able to full fill

requirement then we can also build our own custom cache. Advantage of custom cache is that, you would have full control over life cycle and behavior of cache. Read this blog post to read strategies about implementing custom cache.

Page 216: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• 5. Lazy Instantiation of Component• Instead of creating all Lightning Components at same time, you can delay

instantiation of Lightning component. Check this blog post on how to dynamically create and destroy components.

• 6. Conditional rendering• There are two ways to conditionally render Lightning Components• Using CSS• Using aura:if• If we use CSS, then component would still be created and if there is any

event associated with it, then it would be executed. So, this approach to conditionally render component or element is not recommended.

• aura:if on other hand, would create element only if condition is true. So, we should use aura:if as much possible to defer page load.

Page 217: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• 7. Use of Unbound Expression• There are two ways to bind variables in Lightning Components• Bi-directional binding : It is denoted using ! symbol like {!v.var1}. In this case, if value in var1

changes, Lightning component would be notified and value would be updated. As you can imagine, in background, Lightning component must be using event listeners to keep track of change.

• Unidirectional or unbound expression : If you don’t really need to update Lightning components if value is not changing, then you can improve performance using # instead of !. Syntax would look like {#v.var1}

• 8. Use aura:method for Component Communications• Instead of using events, we can use aura:method to facilitate communication between

components. Its like exposing component API. There are few advantages of using aura:method instead of events, like ability to name method which would help to clarify & identify behavior, ability to use same arguments and define multiple methods.

• 9. Limit event handlers• Try to limit number of event handlers in your Lightning component. As you can guess, multiple

event handler means your component would be busy in listening event changes resulting in performance overload.

Page 218: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• 10. Limit use of Application event• As we know, there are two types of events – Application and Component events. Application

events are very powerful and gives lots of flexibility to communicate between any components in Application. However, we should use Application event with great precaution. As Application event is broadcasted to all components simultaneously, it might be overkill for some components if its not needed. I would suggest going through this post, which explains how communication between component happens and best practices around it.

• 11. Limit use of Javascript Libraries• This is the best time to go back to basics and learn Javascript. There was time when only few

libraries were there like JQuery, underscoreJs etc. However in this ever changing technology every minute there is new Library and new versions of existing libraries. At the same time, vanilla Javascript has also become more powerful with active releases of EcmaScript. You might be able to achieve most of stuff by combining Vanilla Javascript and Aura framework. $A.util has many useful methods for Lightning Component development.

• 12. Use Minified version of Javascript Libraries• This is no brainer best practice. If you end up using library, then make sure it minified, so that

http load would be minimal.

Page 219: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• 13. Use of Lightning Base Components• Instead of reinventing wheels or third party Lightning

Components, have a look at base components first. Creating custom component and then applying Salesforce Lightning Design System doesn’t make sense if you already have Base component. Base component incorporates Lightning Design System, improved performance with minimal foot prints and best practices. You can read more about base components here.

• 14. Debug mode off in Production• You can disable Lightning Component debug mode by navigating

to –Setup > Custom Code > Lightning Components

Page 220: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• 15. Performance ProfilingPerformance profiling. There are many tools available to dig into problem of slow Lightning component before playing in dark. Tools like Lightning Component Inspector in Google chrome or chrome performance tool.

Page 221: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Lightning Events

• Salesforce Lightning is a component based framework for the application development.Component is the core part of the lightning framework. The communication between components are handled by events. There are two types for events:

• Component Event• Application Event

Page 222: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

• Component Events can only be handled by components and the communication will be simple between components. Salesforce recommends using Component events instead of application events. The component events can only be registered in child component and handled by parentcomponent.

Page 223: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

APPLICATION EVENTS

• Application Events helps in passing values between two independent events (without parent child relationship). It behaves just like a broadcast message wherein any device that has the receiver turned on can receive the broadcast message sent from a single device. It means that in case of Application Events, any component with the handler statement defined for the event can receive the fired event.

Page 224: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

COMPONENT EVENTS

• Component Events are required in order to pass values from child component to parent. Parent component (receiver) will be handling the event fired by the child components (sender).

Page 225: Salesforce Certification Training & Courses Online - Victorious Digital

www.victoriousdigital.in

Thank You Join India's 1st Practical Salesforce Classes & Training in Pune with 100% Placement Assistance at affordable fees. Get all details about salesforce classes syllabus, course duration, fees, Job sectors etc. SFDC training is in boom in India.