No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
onTabSave()
Usage
Registers and calls a callback method when a user clicks Save in a subtab’s Unsaved Changes dialog box. When using this method, you must call setTabUnsavedChanges() in the callback method. This notifies the console that the custom save operation completed. In the call to setTabUnsavedChanges(), pass the first parameter as false to indicate a successful save or true to indicate an unsuccessful save. This method is only available in API version 28.0 or later.
Registering a callback method affects the user interface. When no save handler is registered, the user is presented with two options when closing a tab with unsaved changes: Continue or Cancel. When a save handler is registered, the user is presented with three options when closing the tab: Save, Don’t Save, or Cancel. In this scenario, the callback method registered is called when the user chooses Save.
Syntax
Arguments
| Name | Type | Description |
|---|---|---|
| callback | function | JavaScript method called to handle the save operation. |
Sample Code–Visualforce
Response
| Name | Type | Description |
|---|---|---|
| id | string | ID of the tab being saved. |
| objectId | string | Object ID of the tab being saved, if applicable; null otherwise. |