4

Can someone tell me what exactly are we benefiting from setting this property to true ?.

As per documentation, validation rules will be skipped...does it mean the object's validation rules ?

Also what would be a use case where we would want this ?

10

Setting immediate=true does not fire getters or setters and skips validation.

An example use case:

-> You have inputfields for a given object with "required=true" or where the field is required.

-> You have a cancel button.

If the user presses the cancel button and immediate=true is not set and the fields are blank, they will get an error that a field is required.

A blog post with the above information and more:

http://www.sfdcpoint.com/salesforce/immediate-attribute-commandbutton-commandlink-visualforce/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.