Sample code
{
messageName: 'tabSelect',
tab: 'HDR' // Change from the external tab to the record view tab
}
-
In the usage of above scenario, When we select another tab in current working screen , first it will call postMessageListener function in customframework_common.js and then call onsavechanges event.
-
postMessageListenerfunction in customframework_common.js
-
This onsavechanges event written in the user_accounts.js file in window. onload & window.onunload functions.
-
While opening the screen Window.onload function in the user_accounts.js will be called.
-
It’ll redirect to onsavechanges event in the users_accounts.js
-
While leaving the screen Window.onunload function in the user_accounts.js will be called.