To remove required field validation in a Visualforce page, set immediate attribute in <apex:commandButton> to true.
Example:
<apex:commandButton value="Cancel" action="{!cancl}" immediate="true"/>
here immediate="true" makes the action to be executed first before executing any validation rule.
Example:
<apex:commandButton value="Cancel" action="{!cancl}" immediate="true"/>
here immediate="true" makes the action to be executed first before executing any validation rule.
No comments:
Post a Comment