Binding to events (6734+)

The platform sends out events when a couple of events are performed. Code can be written to bind to these.

Events

How to bind

$("tr").bind("hide-field", function(e) {
    // Do stuff..
})

 

Custom events

TS implements a couple of custom events, that you can bind your headers and scripts to.

Preparing Submit

When the platform i preparing to submit the form, first it fires the event TS_PrepareSubmitForm on #TempusServaPage.
You can bind to this event like this:

$('#TempusServaPage').on('TS_PrepareSubmitForm', () => {
  console.log('Preparing submit!')
})

Dynamic reload of fields

If the policy reloadParentFieldsOnClose is enabled (as of version 11355) when a child-record is submittet, the parent record i no longer reloaded, instead a reload is performed in the background, and the child-fields are replaced.
Once this task is performed the platform fires the event TS_RefreshFieldsFromServer on #TempusServaPage.
You can bind to this event like this:

$('#TempusServaPage').on('TS_RefreshFieldsFromServer', () => {
  console.log('child was submitted!')
})

 


Revision #2
Created 25 March 2025 15:02:43 by Theis Villumsen
Updated 12 January 2026 10:13:48 by Theis Villumsen