on_field_get_text(field)
domain: client
language: javascript
class Item class
Write an on_field_get_text
event handler to perform custom processing for the
display_text
property. If the event handler does not return a value, the application uses
the
display_text
property value to display the field value in the data-aware controls, otherwise
the returned value will be used.
The field
parameter is the field whose
display_text
is processed. To get the item that owns the field, use the
owner attribute of the field.
function on_field_get_text(field) {
if (field.field_name === 'customer') {
return field.owner.firstname.lookup_text + ' ' + field.lookup_text;
}
}