+ Start a Discussion
HydHyd 

Reg: Workflows & Validation Rules

Hi,

 

Give some examples In real time scenarios regarding to the following.

When we use,

1. Validation rules

2. Workflows

3. triggers

 

what are the differences among all?

 

please reply.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Pradeep_NavatarPradeep_Navatar

1. Validation rules : It basically use to validate some user defined conditions on insert and update.

 

2. Workflows : It basically use to update the fields after some user defined validation conditions on insert and update.

 

3. Triggers : Some time Workflow do not fullfill our requirement due the lookup with pick list relation type fields. For that we have to use Trigger and by using trigger we can implement our custom business logic.

 

When To Use - For an Example:

 - If we are creating account and we want that user cant input wrong phone number or email id or account number then we use validation rule for this.

- If we want that after record creation a particular field in account record will be auto populate based on the Status pick list value selected by the user for that record then we use Workflow.

- If we want that after record creation a field should be auto populate it may be any types of  field in any object or it may be an extra record creation in the any object then we use Trigger.

All Answers

Pradeep_NavatarPradeep_Navatar

1. Validation rules : It basically use to validate some user defined conditions on insert and update.

 

2. Workflows : It basically use to update the fields after some user defined validation conditions on insert and update.

 

3. Triggers : Some time Workflow do not fullfill our requirement due the lookup with pick list relation type fields. For that we have to use Trigger and by using trigger we can implement our custom business logic.

 

When To Use - For an Example:

 - If we are creating account and we want that user cant input wrong phone number or email id or account number then we use validation rule for this.

- If we want that after record creation a particular field in account record will be auto populate based on the Status pick list value selected by the user for that record then we use Workflow.

- If we want that after record creation a field should be auto populate it may be any types of  field in any object or it may be an extra record creation in the any object then we use Trigger.

This was selected as the best answer
HydHyd
Thanks.