In other previous session we understood about the some of the data entry standards that we can use in
the system to maintain good data quality.
Right.
So this is basically a continuation of that discussion we discussed about the importance of having the
required field backlist a dependent list look up filters required look up filters and doing address
validation what's the significance of doing our job as validation and all these.
Now let's talk about validation rules.
Validation rules very much.
No it doesn't used to for validating the data.
Right.
So this plays a key role in having good data entry standards.
So how we can use validation rules you can use validation rules in the end number of these there are
multiple functions that you can use and validation rules so that you can ensure that users enter correct
information into the system.
Say for example you can use validation rules to make some fields are required.
Then it satisfies the particular criteria or you want the validation rules to match some field values.
So there are a number of ways in which we can use validation rules.
So let's discuss a scenario in which you can use validation rules to maintain some good data in the
system.
Take an example when we have address every business uses our address.
Right.
So what then you create an account record in the system.
You need to give a valid valid billing address so then use those enter information they need to give
a zip code and for having a valid billing address.
Because that doesn't address that you are going to use to contact your customers and we'll leave that
as valid that you can make business with the customer.
So having a valid ideas is mandatory.
So when using the end of a zip code in the system you need to ensure that that is a valid zip code so
that zip code should match with the corresponding state.
So how do you make it happen.
You can very much use validation rules to make this happen.
You can ensure that the zip code that they enter is a valid zip code that belongs to the corresponding
state so far.
There's more to have than this.
First I have created a custom object.
This custom object will have the mapping between the zip code and the state for this what I have done
is I have created a custom field called as a state code and we have the name field which I'll be using
for zip code.
So basically you'll have only a two important fields in this object.
One is a zip code.
The other is the state code and the zip code is basically the new custom field and the state code is
the name field.
Oh sorry I think I got it wrong the state code is a custom field and the zip code is the name field.
I'm sorry about that so we have only these two fields that we need and this particular object.
And once we create these fields we need to populate this object with all the valid data you need to
input all the zip codes and the respective state.
So once this dataset is ready we can use it in our validation rules to ensure that users enter only
appropriate information so this custom object is ready.
Now let's go to the second validation tool.
So this is the icon validation tool that I have created.
If you look at the tool I have used a v lookup function v lookup function comes very handy in creating
some data entry standard v look up likely very much use it in excel in a similar fashion you can use
it in the sales files also you can leverage this function so that you can ensure that B users enter
appropriate data.
But there isn't trick in this just understand the syntax of a V lookup function.
So basically it has three components.
First is the field to return next US field on the lookup object.
And it as a lookup value.
So basically what we are trying to do whenever users create an eye contact card with the billing postal
code and the state the system has to pick the postal code and it has to verify if that postal code belongs
to the billing state.
Right.
So that is the functionality that we need to make it happen.
So then they need to when they pick the building a postal code it has to be verified across the actual
data mapping and where we have stored the data mapping we have stored the data mapping in our custom
object so here the field to return is basically the state code field in our custom object the newly
created custom object that we have stored our data mapping and the field on the lookup object.
Basically the name right because the name is the zip code so the zip code that is pulled from the account
object will be compared against this one.
That is the name field in our custom object and one that compares it takes and thus did code that does
map against that one that does it that state code you discomfort with the building state of a code object
and if it matches the line good if it does not the system will then edit the catch using a v lookup
function to set it always accepts only the name field for the field on the lookup object the field on
the lookup object should always be the name field.
This does not accept other fields that is by no one by number two is the lookup functions that we look
up function we can implement only on custom objects and not standard objects.
So these are some of the key things that you need to consider why using the lookup function but otherwise
we look a function is definitely one of the most efficient functions that you can use to implement these
data entry standards.
And once you do this and the list is simple the error message.
Okay save for a fact.
Now let me go try create an account create an account just give the name as
contest.
One two three.
OK and all we are bothered about is the Boston in court and the state the data that we have.
And third is one two three four California.
So let me say the building postal code is one two three and the state to see a done.
So when I say save for effect it is getting saved.
And in the symbol of a car if I do one two three four and if I try to save it saves the zip code entered
it is not in the mentioned state right.
So this is one of the data entry standard that we can enforce.
So that uses the entered only appropriate information.
And how have we implemented this.
We have used a vehicle function and we have used the validation rules but just motor vehicle functions
as you know you can use most of the functions out there to ensure that users and the appropriate information.