Méthodes
Lors de l’exécution du script par le client, certaines méthodes sont appelées en fonction du contexte d’exécution. Cette page décrit les différentes méthodes disponible et leur contexte d’appel.
OnOpenTask :
{
return
}
//--------------------------------------------------------------
OnPrepareNewEntry :
{
return
}
//--------------------------------------------------------------
OnNewEntry :
{
return
}
//--------------------------------------------------------------
OnModifyEntry :
{
return
}
The next table presents the functions that are taken into account automatically by the rich client. These functions are called for specific events or/and if the configuration specifies the
This function is called when a task is launched, before clicking a record
This function is called when the task has been completely loaded
This function is called when a page is deleted
This function is called when list/processing treatment is launched
This function is called the user clicks the continue button after list/processing treatment ended
This function is called before the server processing when a page is validated with modifications
This function is called after the server processing when a new page is successfully modified.
The following extra variables are available
- CURRENT_DATAPAGE_ID : The datapage of the newly created page
- CURRENT_DATAPAGE_OCCURRENCE : The occurrence of this new page.
This function is called when a page is created. It allows for example to initialize fields
This function is called when an existing page is selected
This function is called before the server processing when a new page is created. It allows for example to initialize fields
This function is called after the server processing when a new page is successfully created. It allows for example to imediately create a new page.
The following extra variables are available
- CURRENT_DATAPAGE_ID : The datapage of the newly created page
- CURRENT_DATAPAGE_OCCURRENCE : The occurrence of this new page.
This function is called before the server processing when the user clicks an entry in the navigator/subnavigator
This function is called after the server processing when the user clicks an entry in the navigator/subnavigator
This function is called before the server processing when the user deletes an entry of the navigator/subnavigator
This function is called before the server processing when the user validates an entry with modifications
This function is called after the server processing when the user validates an entry with modifications
This function is called the first time the user validates an entry (when he creates it)
This function is called after the server processing when the user creates a new Entry
This function is called when the task is closed
This function is called when the user xml copy/paste a screen
This function is called when a new entry is beeing prepared so that the system can pre-fill fields for example
This function is called when a field with the property ScriptOnValidate=“true” is modified by the user.
This function is called when the user modifies a note associated with a field with the property ScriptOnNoteValidate=“true”. The following variables will be available :
- CURRENT_FIELD_ID : The current field in which the user changed the note
- CURRENT_DATAFIELD_ID : The current datafield in which the user changed the note
- NOTE_CURRENT_TEXT : The text of the note
- NOTE_NB_IMAGES : The number of images in the note
- NOTE_NB_SOUNDS : The number of sounds in the note
- NOTE_NB_FILELINKS : The number of files linked in the note
This function is called when the user cancels the modifications in the client.$
This function is called once for each file when the user drops files in the task. This call is performed only if the task allows it (see Task Configuration).
The following extra variables are available
- DROPPED_FILE_PATH : Absolute path to the file
- DROPPED_FILE_IS_LAST : When dropping multiple files, this variable will be true when the last file will be dropped. This allows to refresh a view for example only after the last treatment.
This function is called once for each Mail file when the user drops mails from Outlook (may not work with Outlook Express). This call is performed only if the task allows it (see Task Configuration).
The following extra variables are available
- DROPPED_FILE_PATH : Absolute path to the msg file
- DROPPED_FILE_IS_LAST : When dropping multiple files, this variable will be true when the last file will be dropped. This allows to refresh a view for example only after the last treatment.
- DROPPED_FILE_FROM : The sender name of the mail
- DROPPED_FILE_SUBJECT : The subject of the mail
- DROPPED_FILE_RECEIVED_DATE : The date of reception of the mail
- DROPPED_FILE_SIZE : The human readable size of the mail (i.e. 980 K)
- DROPPED_FILE_CATEGORY : The category of the mail
This function is called when the user taps a supertask tab, before it has been loaded.
The following extra variables are available
- SUPERTASK_TAPPEDTASK_ID : The id of the task the user switched to
- SUPERTASK_ID : The ID of the supertask.
- SUPERTASK_MAINTASK_ID : The ID of the first task of the supertask. This could not be a main task as main task do not appear in supertask type 1, but this will be usefull in any case
- SUPERTASK_TAPPEDTASK_FIRST_TIME : If it’s the first time the user clicks the tab. One important thing to know is that calling cancelCurrentProcess() in the script in the before event will stop the system from switching and will switch back to previous task.
This function is called when the user taps a supertask tab, after it has been loaded.
The following extra variables are available
- SUPERTASK_TAPPEDTASK_ID : The id of the task the user switched to
- SUPERTASK_ID : The ID of the supertask.
- SUPERTASK_MAINTASK_ID : The ID of the first task of the supertask. This could not be a main task as main task do not appear in supertask type 1, but this will be usefull in any case
This function is called when the users clicks the new page button. This script has access to the dossier values and can use the function removeThemeFromNewPageList(<theme_id>) and removePageFromNewPageList(<datapage_id>) to hide the irrelevant pages/themes. This allows to guide the user. |