Using onRecordEditStart

I have created the following simple method:

forms.Ticket.modified_by = forms.login.user_id;

forms.Ticket.modified_time = application.getTimeStamp()/1000;

I want to run it when a record is modified, I figured the place to do that was onRecordEditStart.
But I am getting the following error:

Cycle detected, function modified_record called 22 times

Where is the cycle?

Is this not the correct place to put this kind of method?

because using it with onRecordEditStart, you are creating a loop!
the method, starts with editing, so firing the method again, and again, and again…

Hi elyod_72,

HJK is right. But servoy offers you the features you want (if you use servoy security) just go to the dataprovider window, select your column and click on properties, there you’ll find Auto enter property, with modification user name, and modification stamp (either local or server).