setTabUnsavedChanges()
Sets the unsaved changes icon (
) on subtabs to indicate unsaved data. This method is only available in API version 23.0 or later.
| Name | Type | Description |
|---|---|---|
unsaved | boolean | If true, the tab is marked as having unsaved changes. |
callback | function | JavaScript method that’s called upon completion of the method. |
subtabId | string | The ID of the subtab that is marked as having unsaved changes. This argument is only available in API version 25.0 or later. |
To see this example in action, click the custom link on a case. For more information, see Define Custom Buttons and Links in the Salesforce help.
This method returns its response in an object in a callback method. The response object contains the following field:
| Name | Type | Description |
|---|---|---|
success | boolean | true if update was successful; false if update wasn’t successful. |
This example is only set to run if the Visualforce page is inside an application-level custom component. For more information, see Methods for Application-Level Custom Console Components.
This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field:
| Name | Type | Description |
|---|---|---|
success | boolean | true if returning the focused subtab ID was successful; false if if returning the focused subtab ID wasn’t successful. |