Adding native SQL to BeforeInsert event values

Hi

Is is possible to add native SQL as a value to the Data items instead of only strings? for example

e.DataAction.Data.Add((TableField)“ModifiedDate”, “GETDATE()”);

The problem with the above statement is that the SQL is being translated as

UPDATE TABLE SET ModifiedDate = ‘GETDATE()’

which you can see will not work. is there any way around this limitation?

Thanks

Mark

Hi,

you may try to set AfterProcessing event that will change record after it is updated/inserted:

docs.dhtmlx.com/doku.php?id=dhtm … processing

class CustomBehavior extends ConnectorBehavior{
@Override
public void afterProcessing(DataAction data) {
sql.query("update table set date = GETDATE() WHERE id = "+data.getId());
}
}
component.event.attach(new CustomBehavior());