Tag Archives: Validation Rule
Save Record in Visualforce Page Without Fire of Validation Rule
We can use immediate="true"
in CommandButton & CommandLink, when we don’t want our validation rules to be fired during any server request.
Sample Code:
<apex:commandButton action="{!saveAccount}" value="Save" immediate="true"/>
Different Ways of Making a Field Mandatory in Salesforce
There are 4 ways of making the field mandatory:
Page Layout: Field can be made mandatory from the page layout when it needs to be made mandatory for a set of users.
Field Level Security: Field can be made mandatory from the FLS when it needs to be made mandatory for all the users in the Organization and even from the API’s.
Validation Rule: Field can be made mandatory from the Validation Rule, when it needs to be made mandatory for user who is using the same Page layout used by other users.
Before Triggers: we can also make a field mandatory using before trigger
Note: Salesforce.com recommends using the Page Layout option for making the field mandatory.