+ Start a Discussion

Attachment question

We have a custom object called order that is generated from an opportunity.  If users attach an attachment to an opportunity, is there any way to have that attachment flow over to the order?

Imran MohammedImran Mohammed

If you mean to get  opportunity attachment attached to Order, you can do it by writing a trigger.

In trigger,

1. you have to get parentid of inserted attachment.

2. Query Opportunity object using the parentid.

3. If the query returns opportunity records, create new attachments and set parentid as Order.id for these attachments.


In this way you can achieve this.

Let me know if anything is not clear.