Updating too many records [message #412481] |
Thu, 09 July 2009 12:08 |
deahayes3
Messages: 203 Registered: May 2006
|
Senior Member |
|
|
Help please,
I do not understand why this is occurring. I added a pre-update trigger to a datablock to insert updated_by and updated_date to the table when the record is updated. This works fine except when the user execute query to show all records and hits arrows to go through each record, if the user updates record 3, the updated columns are changed on record 1 and 2 as well. Any suggestions on how to update only the current record?
|
|
|
|
|
|
Re: Updating too many records [message #413401 is a reply to message #413268] |
Wed, 15 July 2009 09:43 |
deahayes3
Messages: 203 Registered: May 2006
|
Senior Member |
|
|
Hello,
I actually removed the post-query trigger from the datablock. It is still doing the same thing. Through debug I can see it updating each record on the pre-update trigger. The following are the only triggers I have the the datablock.
pre-insert
when-validate-record
pre-update
I believe the error is coming from a field that has a post-text-item trigger. It starts off like this
IF :control.location_id is not null
and :system.record_status <> 'QUERY'THEN
[Updated on: Wed, 15 July 2009 10:06] Report message to a moderator
|
|
|
Re: Updating too many records [message #413429 is a reply to message #412481] |
Wed, 15 July 2009 11:50 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
If every record is being updated then some code in some trigger is causing every record to have it's status changed.
If your POST-TEXT-ITEM trigger only does anything if the record status is not QUERY then presumably it's a different trigger that's causing the problem.
If you can't find the trigger then you may have to resort to debugging the record status in every trigger you can find - one of them is changing it.
|
|
|