Validation rules help you to improve data quality by preventing users from entering incorrect data. We can write one or more validation rules that consist of an error and corresponding error message.
Validation rules verify that the data a user enters in a record to meet 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.
Defining a validation rule on date of joining the field:
→ Select the object where you want to define the Validation rule
→ From the object, go for validation rule property
Click on new
Rule name DOJ rule
Date of joining—c>Today ()
Error message ↓
Enter correct date
Error location Top of page Field
Page layouts control the layout and organization of buttons, fields, s-controls, Visualforce, custom links, and related lists on object record pages. They also help determine which fields are visible, read only, and required. Use page layouts to customize the content of record pages for your users. It determines types of fields and their organization to a specific user on a page.
Creating a new page layout for employee object
Click on you → setup → create → objects → click on employee object → go to properties of employee object → select page layout → new
What is the checking for validation?
1.Data type/ field type
Record types let you offer different business processes, picklist values, and page layouts to different users. The record type is used to create an interface that suits the business process.
Record types are :
It is the storage structure to store the data in an efficient way.
→ To create data model we require
→ Every project starts from the creation of data model in which, various objects, fields, relationships and validation rules are defined along with page layouts.
→ The next step in the process is to fetch the data in the data model, there are various mechanisms to fetch data into the data model :
→ Importing data from CSV file to the DB ↓
Comma separated value
→ The CSV file can exist anywhere on the system
→ Creating CSV file:
Steps to import data through custom object:
Click on user name → Setup → Administration setup → Data management → Import custom object → Select 6 starts the import wizard
Step1: choose record → From the list below, choose the object label
Step 2: prevent duplicates
Step 3: specify relationships
Which user field are you including in your file to designate record owners?
Step 4 : file upload
Step 5: field mapping
Step 6: verify import settings
Click import now
Import now ←|
Step 7: import initiated
Maximum limit of import data is 50,000 records per session
Per session we import 50 k records only
Session means login and logout
Data Loader is a client application for the bulk import or export of data. Use it to insert, update, delete, or export Salesforce records
The advantage of using import wizard is that it supports various languages and checks for duplicates.
To overcome the limit of 50 k records per session, we use an Apex data loader.
Apex data loader:
→ This is a local system software that can import data to SFDC
→ Apex data loader present version is 2.2.0
→ The various operations that can be performed through Apex data loader are:
Insert :- creates a record
Update:- modifies a record
Upsert:- either insert or update
Delete:- removes records
Export:- fetch data from SFDC
Importing data through Apex data loader to SF:
From the mail, enter the file my personal information
Security token along with your pwd, reset, security token
Enroll for Live Instructor Led Online SALESFORCE TRAINING
Get Updates on Tech posts, Interview & Certification questions and training schedules