You need to sign in to do that
Don't have an account?

Simple update set of records
In Apex/Eclipse, how can I perform this simple update:
UPDATE bookings SET field1 = 'a', field2 = 'b', field3 = 'c' WHERE set_id = 999
So all I want to do is update all the records with the set_id that I specify. bookings would be my custom object.
Cheers
UPDATE bookings SET field1 = 'a', field2 = 'b', field3 = 'c' WHERE set_id = 999
So all I want to do is update all the records with the set_id that I specify. bookings would be my custom object.
Cheers
Is there a way to store the Ids that have been updated in a static List? Then check the list before updating. I tried this but did not seem to work.
I have even tried checking if the record has been updated in the last 10 seconds, only if that is false do the update. This does not work because the before update trigger can not access the lastUpdated field.
I have got it working by using a boolean in a static class. When the trigger fires is checks the boolean, if its false, the trigger skips all the code. So just before I call the update DML, I set this boolean to false, so when it fires the trigger, it appears not to run.