In this tutorial, we are going to create Tab and Validation rules for Automated tuition class registration.
To create Tab go to Setup -> Create -> Tabs -> New Custom object Tabs, and there select object Student.
After creation of tab, we can also customize / edit the page layout.
As you can see, On Custom tab, Go to Page Layouts section and click on Edit button.
Final look of page is shown in above screen shot.
Creating Validation rule in salesforce:
Now lets have a look in Validation feature of salesforce.
Validation rules verify that the data a user enters in a record meets 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.
To begin using validation rules, click Setup | Customize, select the appropriate activity, standard object, or users link from the menu, and click Validation Rules. For custom objects, click Setup | Create | Objects and select the custom object. Validation rules are listed in the Validation Rules related list.
Note : Validation rules apply to all new and updated records for an object, even if the fields referenced in the validation rule are not included in a page layout or an API call. If your organization has multiple page layouts for the object on which you create a validation rule, verify that the validation rule functions as intended on each layout. If your organization has any integrations that use this object, verify that the validation rule functions as intended for each integration.
In our scenario, lets say the installments cannot be less than 500.
As you can see in above screen shot, we have created the Validation rule. if Validation rule is not satisfied then we can also display the custom message.
The demo of above validation rule is demonstrated in below screen shot.
The validation message can be shown at header or it can be shown below fields also.
In next tutorial, we will see how to create the welcome mail template for the student, if he joins any course.
Leave a Reply