Month: February 2014

Validation Rules in salesforce

Validation rules in salesforce contains a formula or expressions that evaluates the data in one or more  fields in a record to meet the standards and returns a vale “True” or “False”. Validation rules displays error message to the user when the Condition is “False”.

Validation Rules in Salesforce

In this Training tutorial we are able to know about validation rules in salesforce, how to create validation rules,Validation rule considerations and also we discuss how Salesforce processes Validation rules.

How salesforce processes Validation rules.

There are five types of Rules in salesforce and the priority of each rule is according to their order. Salesforce processes rules in the following order.

  1. Validation Rules.
  2. Assignment Rules.
  3. Auto-response Rules.
  4. Workflow Rules.
  5. Escalation Rules.

Validation Rules in salesforce are to enforce integrity constraints(conditions) against the data. Here we give conditions in formula editor to meet our requirement. If one validation rule fails, salesforce continues to check another validation rule contained in the field or record and displays appropriate error message at that field or above the Record.

Important points to remember on Validation rules.

  • If validation rules exist for activities  and we created an activity during the lead conversion. Here the lead converts but the task is not created in the activity.
  • Campaign hierarchies ignore validation rules.
  • Validation rules are made to run before creating records submitted through web-to-lead and web-to-Case.

Validation rule fields restrictions.

Validation rule formulas don’t refer to the following fields in salesforce.

  1. Compound fields.
  2. Addresses.
  3. First and Last names.
  4. Dependent picklist and lookups.
  5. Campaign static fields.
  6. Merge fields for auto numbers.
  7. Compound address fields(Mailing address).

Examples of Validation rules in salesforce.

How to create validation rules in salesforce.

Formula fields in Salesforce

Formula fields in Salesforce :  Formulas are those which are used to calculate something, combine data from multiple fields, to check for a condition, to show information from one record on a related record.These formulas will be simple or complex with layers of nested logic s. Formula fields is based on other fields values and it is shown only in detailed view of an object and can not be viewed in editable view of an object.

Where we use formulas  fields in Salesforce ?

  •  Business logic.
  •  formula field.
  • Default values for fields.
  • Workflow rules .
  • Validation rules
  • Reporting.
  • Buttons and Links.

Formulas in salesforce can be made up of two Parts .

  • Formula Syntax : Which we write n the formula editor.
  • Database query .

Formula syntax allows 3,900 maximum number of characters and the size of the formula when saved will be 4,000 bytes.Depending up on the Formula syntax and query the complexity increases.

Follow below limitation when using formulas to reduce complexity.

  1. Minimize the number of references to other fields.
  2. Minimize the number of times formula functions are called.
  3. Rethink about your picklist.
  4. Choose another way about the problem
  5. If all above cases fails use Workflow field update.

Operators and Functions used for formulas.

  1. Math Operators.
  2. Logical Operators.
  3. Text Operators.
  4. Date and Time Functions.
  5. Informational Functions.
  6. Logical Functions.
  7. Math Functions.
  8. Text Functions.
  9. Summary functions.
  10. Advanced Functions.
  11. Encoding Functions.

Picklist, Controlling Picklist and Dependent Picklist in salesforce

Picklist, Controlling Picklist and Dependent Picklist in salesforce : In this tutorial we are going to learn about the custom field type “Picklist”. In general all we know about picklist. In salesforce also the description is same Picklist allows to contain multiple values and pick One among them or Multiple among them.

Salesforce Tutorials

Free Salesforce Tutorials

Picklist Characteristics.

  1. Picklist values are Static and can not defined dynamically.
  2. Picklist values are maintained by Administrator.
  3. Picklist values are displayed as drop down menu.
  4. Maximum number of characters allowed in Picklist is 15,000.
  5. Custom Picklist can have 1,000 entries and 255 characters per entry.
  6. Custom multi-select picklist can have up to 150 values and 40 characters per value.
  7. For multi-select picklist, users can select up to 100 vales at the time on a record.
  8. Picklist have Controlling and Dependent picklist.
  9. Picklist vales does no have any other associated data.
  10. Values are captured in Web-to-lead submissions where Web-to-lead do not support custom relationship fields.

Creation of Picklist.

Here we are creating Picklist for Country and Continent. Picklist is a field type in which it allows to contain values and pick one value.

 Steps to create Picklist.

Setup => Build => Create => Objects => Custom field ans Relationships => New => Picklist

Now we are creating picklist for Country and Continent. Enter the details as given below for Country Picklist.

Enter the country names. One country name for each line and select Next.

Select all Check box and click next.

Select Save.

Now create Picklist for Continent.

Field Dependency.

Here we want to establish the field dependency across the two fields Continent and Country.

Controlling Field : The value in dependency controls the value of the dependent field.

Dependency field : The vale on Dependency field depends on value of the Controlling field.

Now we are going to create Controlling field and Dependent field.

Go to Setup => Build => Create => Objects => Custom field ans Relationships => Field Dependency.

Double Click on the list to select or select include or exclude.

How to create Custom Tabs in sfdc

How to create Custom Tabs in sfdc: In this training article we are going to create Custom Tabs and also we are learning about how to arrange custom Tabs  in Tab Menu.

Generally there are three types of Tabs available in sfdc.

  1. Custom Object Tabs.
  2. Custom Web Tabs.
  3. Visualforce Tabs.

Custom Tab Definition : Custom Tab is a user interface component which we create to display custom Object data or other web content embedded in the application.

We can find all these three Tabs in different Editions of Salesforce.

Custom Object Tabs : Contact Manager, Group, Professional, Enterprise, Performance, unlimited and Developer Editions.

Custom Web Tabs : Contact Manager, Group, Professional, Enterprise, Performance, unlimited and Developer Editions.

Visualforce Tabs : Contact Manager, Group, Professional, Enterprise, Performance, unlimited and Developer Editions.

How to create Custom Object Tabs in Sfdc.

Custom Object Tabs : Custom Object Tabs are those which displays the data of or custom object in a user interface tab.Custom Object look and function like Standard Objects.

Steps to create Custom Tabs.

In Previous training articles we created Custom student Object. For Custom Student Object we are going to create  Custom Student Tab and also we are going to arrange that custom Student Tab in Tab Menu.

First go to Setup Menu = > Build Section => Create => Tabs.How to create Custom Tabs in sfdc

Select New.

Now we are required to select the object to which we want to create Tab and also select Tab Style from popup window.

Select Next.

Now we are taken to new window . Choose the user profiles for which the new Custom tab will be available and also we can examine or alter the visibility of tabs from the detail and edit pages of each profile.

Select next.

Step3 : Add to Custom Apps.

Choose the custom apps for which the new custom Object tab will be available. Select Include Tab check box and Save .

custom Object Tab is successfully created but we are not able to look in Tab Menu. In order to arrange Custom Student Tab in Tab menu select(+) all Tabs menu.

Select Customize my Tabs.

Now we see list of Available Tabs and selected tabs. Move Student Tab upwards using arrows. Place Student Object Tab to which place you prefer and Save.

How to create Custom Tabs in sfdc

Now we  are able to see Student tab in Tab Menu.