3

I want to create trigger on the Attachment object, but am not able to find it in setup. Can anybody suggest how to do it?

I am assuming it can be done from Developer console, but I am not sure of the correct steps to take.

2 Answers 2

4

You can not create trigger on attachment from salesforce standard setup

But you can create trigger on attachment from developer console or eclipse. Go to developer console -> File -> New -> Apex trigger. Then select Attachment sObject

For more details please refer following link:

http://www.sfdcpoint.com/salesforce/trigger-on-attachment-in-salesforce/

4

There are 3 ways you can do this :

  1. Developer Console :
    Create trigger from Developer console. Need to click New: Apex Trigger: Then you can select SObject as "Attachment" form dropdown. https://help.salesforce.com/HTViewSolution?id=000181538&language=en_US

  2. Force.com IDE/ Forece.com Migration Tool :
    A trigger can be written on Attachment using Force.com IDE or ANT.

  3. From UI:
    Go to Setup>Customize>Account>Triggers
    In the URL, you will see entity as "entity=Account". Change this to "entity=Attachment" and you are good to go.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .