You need to sign in to do that
Don't have an account?
FdeBergeyck
remove record from trigger.new
Hello,
Does anybody knows how you can remove a record from trigger.new before the insert? I tried with
System.Trigger.new.remove(i);
But I get the followin error message:
19:00:04 INFO - <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="http://soap.sforce.com/2006/08/apex"><soapenv:Body><soapenv:Fault><faultcode>sf:UNKNOWN_EXCEPTION</faultcode><faultstring>UNKNOWN_EXCEPTION: An unexpected error occured. Please include this ErrorId if you contact support: 554952691-62</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
Thank you for your help
François de Bergeyck
and List<contact> oldContacts = trigger.old), and then delete from those lists?
Also, might there be a problem if you only have one object in the list and are making the list go empty?
Is there any reason why you do not want to notify the user?
Nikola
Thank you,
I actually figured a way around to solve my problem: I created a toDelete checkbox on the object, and a trigger after insert that deletes the record if the checkbox is checked.
The users are not notified because the only user that can create the records is the integration user...
Thank you again
François