Is it advisable to avoid bulkification in a trigger on attachment object?

Even if you are 100% sure that there is no possibility you will not have 200 attachments to modify, you also have to think that other code might execute in the same execution context and if the code you are creating is not efficient, it might impact the code that would have succeeded if the resources used by your code were lower.

So always optimise your code to run with the lowest resource possible.


There is no Harm in adding this bulkification. NEVER say never....you could find the need to do a mass upload of attachments in the future, or another admin could do it as well.

ESPECIALLY since you already have the code written, go with the bulkified. In my opinion, I'd rather have something in place that I might never need, but be all set in the off chance that I do need it.....No risk in being overprepared for all scenarios.

If you think about it, what does NOT putting in the bulkified code save you?