Description
The AfterEdit event is executed after the data record was updated in the database. It works in all edit modes: Inline Edit, Regular Edit and an Edit page in a popup.
Syntax
AfterEdit(values,where,oldvalues,keys,inline,pageObject)
Arguments
Note: Field names are case-sensitive. If the field name is PlayerId, you should use oldvalues["PlayerId"]. Note that oldvalues["playerid"] or oldvalues["PlayerID"] will not work.
Note: If the field was assigned an alias in the SQL query, then the values array will get the alias instead of the field name from the database.
E.g., if you have an SQL query SELECT salesrep_id AS Inv_Salesrep ..., you should use values["Inv_Salesrep"].
values
an array of values to be written to the database. To access a specific field value, use values("FieldName").
where
WHERE clause that points to the edited record. Example: ID=19.
oldvalues
an array with existing field values. To access a specific column value, use oldvalues["FieldName"].
keys
an array of key column values that point to the edited record. To access a specific key column, use keys["KeyFieldName"].
inline
equals to '1' for the Inline Edit, '0' otherwise.
pageObject
an object representing the current page. For more information, see RunnerPage class.
Note: If you need to display a message on the page or pass a variable value to JavaScript, you need to add the following to the end of your event code:
pageObject.stopPRG = true;
Example
Passing true to pageObject.stopPRG = true variable named "saved":
pageObject.setProxyValue("saved", true);
pageObject.stopPRG = true
pageObject.setProxyValue "saved", true;
pageObject.stopPRG = true
Applies to pages
Edit, Inline Edit.
Recommended sample events:
•Add new button to Add/Edit pages
•Change message after record was added or saved
See also:
•AJAX helper object: setMessage()