Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Appearance

Change the message after the record was added or saved

Scroll Prev Next More

 

To change the message, use the following code in the AfterAdd or AfterEdit events:

Example 1

Change the error message:

 

pageObject.setMessageType(MESSAGE_ERROR);
pageObject.setMessage("An Error Occurred");

 

This is how the result looks like:

change_message

Example 2

Change the 'success' message:

 

pageObject.setMessageType(MESSAGE_INFO);
pageObject.setMessage("The data was successfully saved");

 

Note: These code snippets always work on the Edit page. They do not work on the Add page if you choose to display the master data on the details page.

See also:

Grid Row JavaScript API: row.setMessage()

RunnerPage object

Error reporting

Display a message on the Web page

Master-details relationship between tables