Sample code
{
messageName: 'directSelect',
systemFunction: 'WSJOBS'
userFunction: 'JBJOBS' // Optional, if userFunction is not a clone screen then it's not necessary to provide in the message.
drillbackParams: {// Optional, drilldown to a specific record. Record View only.
<key_field_name>: <key_field_value>,
<key_field_name>: <key_field_value>,
etc...
}
}
-
In the usage of above scenario, when we switch to another 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