function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mustafa JhabuawalaMustafa Jhabuawala 

how to update custom object fields once the attachment for a particular record has been uploaded ?


I want to update a field in my custom object, once any attachement for the record has been uploaded, I want to update a specific field of that custom object.

Note: I don't want to write a trigger on attachement, because it will be used at multiple places and I don't want to create miltiple calls on the trigger.

If anyone knows the solution of above problem please help or share your ideas

Tavva Sai KrishnaTavva Sai Krishna
Hi Mustafa,

This can be done only through triggers and it is on attachment object.  But in the trigger we will check with the parent Id of the attachment and if the parent Id is equals with the custom object which we need to update the field then we will update else do nothing.

let me know if you need any help.

Sai Krishna Tavva.
Mustafa JhabuawalaMustafa Jhabuawala
Thanks Sai Krishna Tavva.

But I want some other way to achieve this. If you get some other way please let me know.

Thanks for your response :)