You need to sign in to do that
Don't have an account?
jitendra singh 172
What is Use of action attribute in <apex:page /> tage ???
What is Use of action attribute in <apex:page /> tage ???
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
The main use I've found is deciding whether the user should stay on this page or be directed elsewhere. For example, if a visualforce page overrides a record view for everyone apart from the system administrator, the profile of the user can be checked via merge syntax on the page or via an action method, and if the user is a sysadmin they can be sent elsewhere. All of this happens before any part of the page is displayed.
This example code snippet uses ‘action’ attribute.This Method is called before page is rendered and allows you to optionally redirect the user to another page.
Controller: Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.Thank you
All Answers
Salesforce provides a way to define logic before rendering a visualforce page by providing a special attribute called as ‘action’.
Check https://www.greytrix.com/blogs/salesforce/2017/07/20/using-action-attribute-at-vf-page-tag/ that provides code snippet as an example.
Check Bob's answer on the post https://developer.salesforce.com/forums/?id=906F000000098ghIAA for more details.
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.Thank you
Your provided links are not working , can you explain me it in simple langauge.
The main use I've found is deciding whether the user should stay on this page or be directed elsewhere. For example, if a visualforce page overrides a record view for everyone apart from the system administrator, the profile of the user can be checked via merge syntax on the page or via an action method, and if the user is a sysadmin they can be sent elsewhere. All of this happens before any part of the page is displayed.
This example code snippet uses ‘action’ attribute.This Method is called before page is rendered and allows you to optionally redirect the user to another page.
Controller: Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.Thank you