You need to sign in to do that
Don't have an account?
Nikhil
Trigger on attachment object does not works on AfterInsert event
Hi All,
I created a trigger on Attachment object and event used is afterInsert,afterDelete
Sample Code
-------------------
trigger abc on Attachment (after insert, after delete) {
if (Trigger.isAfter && Trigger.isInsert)
{
// Block 1
}
else if (Trigger.isAfter && Trigger.isDelete)
{
// Block 2
}
}
here trigger successfully executes "Block2" when i update the attachment but it doesn't executes "Block 1" when a new attachmeent record is created
So trigger is not responding on <after Insert> event
Please suggest ASAP
Thanks
I created a trigger on Attachment object and event used is afterInsert,afterDelete
Sample Code
-------------------
trigger abc on Attachment (after insert, after delete) {
if (Trigger.isAfter && Trigger.isInsert)
{
// Block 1
}
else if (Trigger.isAfter && Trigger.isDelete)
{
// Block 2
}
}
here trigger successfully executes "Block2" when i update the attachment but it doesn't executes "Block 1" when a new attachmeent record is created
So trigger is not responding on <after Insert> event
Please suggest ASAP
Thanks
I am facing the same problem. Attachment trigger works on update but not on insert.
DO you happen to have any updates on this?
Thanks
No Shan, i couldn't get it to work
There are so many posts on this issue on the forum but surprisingly no one from salesforce has ever commented.