Fires before every Ajax callback made to the server.
Fires when an Ajax callback is made to the server. You can use this event to authorize the callback action. The e variable contains information about the callback you can reference in your Xbasic code.
If you want to prevent the Ajax callback from executing, set the e.authorized variable to .f.. If you do not set the e.authorized variable or set the value to .t., the callback will be executed.
Several variables are available for reading or setting in the canAjaxCallback event. These variables are properties of the e object. The varialbes in the e object include:
The definition of the UX Component.
The Ajax callback action name.
The name of the Ajax callback function that will b called.
Your code can set the following variables in the e object:
A .t. or .f. value. If you do not set the value for this property, then authorized is assumed to be .t.. If authorized is .f., the callback action is not performed.
When working in Live Preview you can get the names of the simulated security groups using this variable: e.tmpl.Livepreview_permissions_friendly
When running in a real application, you can get the names of the security groups for the logged in using using: Context.Security.GetUserRoles()