Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

---------------------------------------------------------------------------------------------------------

Salesforce Training By Mohan - VLR Training Institute – Contact: +91-6301332114


---------------------------------------------------------------------------------------------------------

Class-15,16,17,18,19)

TOPICS:
-----------------------------
- work flows
1. Field update:-> change the owner for different reocrd type students. USA one owener, UK another owenr,...
- If master detail relationship -> we can write workflow on child object and update master object fields
- Account, contact -> write workflow on contact and update account field values on account record
- If lookup relationship -> if we write workflow on child object, we can not update parent object field values
on parent
record
2. Task creation -> reoccuring reminders to complete home work for students or reminder to complete topic for
staff
3. When a record is assigned to one owner send email notification to that owner
Ex: Institute in india is maintained by different team. When a new student is created for any course then
student owner
is assigned to different administrators(users) based on course & record type )
4. Send email notification to the staff when institute paid salary on every month.

-------------------------------------------------------------------------------------
-> Workflows
* Workflow Rules are automated processes to send E-mails alerts, to assign tasks, to update fields while
creating
or updating the data/records.
* Workflow rule will execute based on Rule criteria and evaluation criteria.
* Workflow rule will perform some actions like Fieldupdate,email alert,Task,outbount messages
* If Rule criteria and evaluation criteria is satisfied then workflow actions will be performed

* Navigation to create workflow rules:


setup -> Build -> Create -> Workflow & Approvals -> Workflow Rules -> New Rule -> Object ->
Ener the details ->
1. Enter 'Rule Name'
2. Select any one 'Evaluation Criteria'
3. create 'Rule Criteria'. We can create 'Rule Criteria' in two ways. one is 'Criteria are met' and second is
'Formula evaluates to true'
4. IF you select 'Criteria are met' in the 'Rule criteria' drop down then you need to 'Add filter logic'
5. Save & Next
-> We will be landed on new page. From here, We can create new workflow actions to this workflow rule and
also we
can add existing workflow-Actions .

* Evaluation Criteria :
* created
- Every time when a new record is created this evaluation criteria will be satisfied
* created, and every time it's edited
- Every time when a new record is created OR every time when an existing record is updated then the
evaluation criteria will be satisfied
* created, and any time it's edited to subsequently meet criteria

* Rule Criteria :
* We can define some rules related to that object fields or parent object fields.If all these rules are satisfied
then this Rule Criteria is
satisfied.
* For example,Rules are Like ==> if course Name = 'Salesforce' AND country='India' AND state= 'Telangana'
If a record satisfies the above condition then this Rule Criteria is satisfied.

* Workflow Actions:

* There are 4 different workflow actions available in salesforce.


1. Field update
2. Task
3. Email Alert
4. Outbound Message

* We can execute the above 4 workflow actions either immediately or after some time.
* If we execute above 4 workflow actions immediately are called 'immediate workflow actions'.
* If we execute above 4 workflow actions after some time are called 'Time dependent workflow actions'.

* Explanation:
1. Field update:
- This action will update a field value on the record.
- It will update a field on any object(custom object and standard object) record
- This action will execute when both evaluation criteria and Rule criteria are satisfied on the workflow Rule.
- Navigation to create any Workflow Action:
* We can create field updates from different places.

A) One way is, creating directly


setup -> Build -> Create -> Workflow & Approvals -> Field Updates -> New Field Update -> Ener the
details ->
1. Enter Name
2. Select 'Object'
3. Select 'Field to Update'
4. Specify New Field Value
5. Save

B) Second way is, creating from workflow rule


setup -> Build -> Create -> Workflow & Approvals -> Workflow Rules -> Open existing workflow rule
-> under 'Workflow Actions' click on Edit button -> you can see two type of actions
-> Select any one action (Immediate Workflow Actions) -> You can see 'Add workflow Action' drop down.
Select any one
Action (New Field update) -> Ener the details ->
1. Enter Name
2. Select 'Object'
3. Select 'Field to Update'
4. Specify New Field Value
5. Save
* Note: In this way system will automatically assign this newly created Action to that existing workflow
Rule.

C) Third way is, you can create workflow actions when you are creating a new workflow rule. Once new
workflow
Rule is created then you can create new workflow action from that page(see the above way[Second way])

* Note: In this way system will automatically assign this newly created Action to that
newly created workflow Rule.

- Navigation, to assign existing Workflow Action to the existing Workflow Rule:


setup -> Build -> Create -> Workflow & Approvals -> Workflow Rules -> Open existing workflow rule
-> under 'Workflow Actions' click on Edit button -> you can see two type of actions
-> Select any one action (Immediate Workflow Actions) -> You can see 'Add workflow Action' drop down.
Select 'Select Existing Action' -> Under 'Choose Action Type' you can see 'search' drop down.Select
any workflow-Action -> you will see existing actions under 'Available Actions' box -> Add and save

2. Task:
- This action will create a 'Task' for current object record.
- This action will execute when both evaluation criteria and Rule criteria are satisfied on the workflow Rule.
- Task is nothing but a 'work' which needs to be done by the user.
Here Users are nothing but Business users those are sales reps, marketting reps, managers..etc.. Any one
who is working to the Business are nothing but a business user.
- We can remind our our work by using Tasks.

3. Email Alert
- This action will be used to send an email to the users or customers. Users are Business users.
- We need to create an 'Email template' to send an email with the help of 'Email Alert' action
- This action will execute when both evaluation criteria and Rule criteria are satisfied on the workflow Rule.

1) Field Update:
-------------------------------------------------
Req-1) Institute is having different administrators for different business units(USA,UK,India). 'Venkat' is the
administrator for salesforce training for Hyderabad location in India. He is the responsible for all the
students who are learning sales-force in Hyderabad location. His duty is to collect fees,sending videos
to the students, helping students in other aspects.

Requirement is -> Make 'Venkat' as a owner for all the 'salesforce' students for Hyderabad location.

Sol)
-> Student object is having a master object. The owner on the master record will be act as owner for the
respected
child records(Student Records).
-> Write a workflow rule on 'Course' object.Update owner on the course object with 'Venkat'. By default he
will
become the owner for student records.
Req-2) Cross object Field update:

-> If we have master detail relationship -> we can write workflow on child object and update master object
fields
-> Req) When a new student is created then I would like to update a field value in Course record. The
relationship
between Course and student object is master detail relationship.
-> Sol)

-> New_Student_Details

Req-3) Cross object Field update:

-> If we have master detail relationship -> we can write workflow on child object and update master object
fields
-> Req) When a new contact is created then I would like to update a field value in Account record.

-> Sol)
- Write a workflow rule on contact object
- create a field update to update parent account based on child contact

Req-4)
-> If we have Lookup relationship -> Try to update the parent lookup record field value by Inserting/updating
the child record
-> Req) When a new student is created/updated then I would like to update the parent students batch record.

-> Sol)
- Write a workflow rule on student object
- Try to create a field update to update parent 'student bath' record field value

2) Task Creation:
-------------------------------------------------
- Task is a standard object.
- Task will be available under 'activities'
Setup -> customise -> Activities -> Task ojbect details
- How to create a custom field for Task object?
Setup -> customise -> Activities -> 'Activity Custom Fields' -> New
- How to enable 'Task' object to any custom object?
setup -> objects -> open custom object detail page -> Edit -> Allow Activities -> Save
- Task is always a child object for all objects
- We can not create Task directly. We can create Task from any of the parent object.Parent object should either
a
custom object or a standard object
- To create a Task on any of the object, we need to enable 'Allow Activities' for the particular object
- How to add Task to parent Record:
* goto parent record layout -> related list -> select open activities -> add -> save

-> Req) System Need to send reminders to administrator 'Venkat' to followup with students to complete the
given home work.
[course: salesforce, batch: 8:15AM Batch, Country: India]

3) Email alert :
-------------------------------------------------
* Email alert is used to send an email to users,contacts,emailfield emails.
* This action will perform when an workflow rule is executed

Req-> When a new assignment is created then send an email to a Institute admin user(Venkat)
You can also create a new Task along with email alert.

Sol)
-> Use existing 'Assignment' Object
-> Create a workflow rule.This rule will executed when a new Assignment record is created.
-> Create an email alert workflow action.
-> Create 'Task' workflow action

-> Email Templates


* Used to set the body of the email
* We can dynamically capture the Record data
* These are used to in sending email.
* There are different email template types available in salesforce
1. Text
2. HTML
3. custom
4. Visual-force

Time based Workflows :


--------------------------------------------------------

* Time based Workflow actions are used to execute the actions based on time you have set(before OR after)
* We can set the time on hourly basis OR on Days basis
* We cannot add new time triggers to an active workflow rule
* We cannot add time-dependent workflow actions if evaluation criteria is "Every time a record is created or
edited"

Req-> When a Task is created then send an email to a user where the Task is assigedn to him (Assigned To).
This user is the owner for that Task. We need to send an email to user after 1 hr

Sol)
-> Create a workflow rule.This rule will execute when a new Task is created.
-> Create time dependent work flow action
-> Add workflow actions(New/Existing) to this time dependent workflow trigger
- Create an email alert. This will be used to send an email to Task Owner(Assigned to)
- Email Templates
* HTML

Notes:
-> We have created a workflow rule and added time depedent workflow actions. If this workflow is executed
and time
dependent workflow action is scheduled after some time. In the mean time if you delete the record which is
executing the workflow
rule, then scheduled workflow action will be deleted.

-> We have created a workflow rule and added time depedent workflow actions. This workflow is executed
and time
dependent workflow action is scheduled after some time. In the mean time if you update the record where it is
not
met the rule criteria then scheduled workflow actions will be deleted.

* How to see scheduled time based workflow rule?


setup -> Monitor -> Time-Based Workflow -> add filters to search your workflow rule

-> Evaluation Criteria -> Evaluate the rule when a record is created, and any time it's edited to subsequently
meet criteria
* When we editing the record -> if the rule criteria is not matched when this record edited last time and now
the rule criteria is matched

------------------------------------------------------------------------------
previous_record_update | current_record_update | Does_workflow_executed?
-----------------------------------------------------------------------------
Rule_criteria_met | Rule_criteria_met | NO
-----------------------------------------------------------------------------
Rule_criteria_did_not_meet | Rule_criteria_met | YES
------------------------------------------------------------------------------

================================================================================
===========
Overview:
------------------------------------------------------------------
Workflow
-> Workflow Rules
- Rule criteria
- Evalution criteria
- Object

-> Workflow Actions


- Field update
- Task
- Email alert
* Email Template
- Text
- HTML
* Letter Heads
- custom
- VF
* Users (To whom we need to send email)

- Outbound message
================================================================================
=======

You might also like