vaishali_sftdev
15th May 2008, 21:42
Hi,

In my session script, i were setting a date field in before.display to date.num(). The problem is whenever i used to delete the record that were entered on the day other than the current date, this error comes. But when i delete the record inserted on the same day, i did not encounter this error. I am not understanding the reason.

So, what i did is. in before.write i set the value of field to date.num(). Now, the problem is solved.

But i want to understand the logical reason behind it. Is the possible reason, since there was already a value for the field fetched from the db, but it was changed to new value when displaying the field. So, until one transaction is completed (committed) while updated due to the different dates, i am starting another transaction (deleting). Please, correct me? and tell me what can be the possible reason for same.

Thanks.

mark_h
15th May 2008, 21:50
I believe you are correct. When pulling the old date the new date would overwrite that and making the session think it was in the middle of an update. At least that is what I think.