You need to sign in to do that
Don't have an account?
Shrutika
Hey everyone , facing issue with contentdocumentLink(CDL) object.
have already written trigger on CDL object.
Whenever I am submitting service request with multiple attachment ,
trigger first should handle all attachment at once of that record and then must call apex method (send email) is the scenario.
At this time , for every attachment it is calling apex method and sending separate email.
Even If multiple attahment are attached to record , it sends separate email for every attachment.
(Note - can't write trigger on incident obj , as after inser attachment is not getting available.)
Your help would be much appreciated.
Whenever I am submitting service request with multiple attachment ,
trigger first should handle all attachment at once of that record and then must call apex method (send email) is the scenario.
At this time , for every attachment it is calling apex method and sending separate email.
Even If multiple attahment are attached to record , it sends separate email for every attachment.
(Note - can't write trigger on incident obj , as after inser attachment is not getting available.)
Your help would be much appreciated.
IF the purpose of the Email is just to notify a user that Attachments are added, then from your CDL record set a flag on the LinkedEnity i.e Incident record. Then fire your email logic from the Incident trigger when the first time the Flag is set from false to True.
Or if you wanna notify about total number of attachments attached to the Incident, then i would use the similar logic to set a flag on the Parent record. Then fire a scheduled action in your Process builder to run the logic after 2 minutes from the time the Flag is checked.
So when the first attachment is uploaded, the system would set the flag.
Then PRocess builder will be fired once for the First attachment.
2 minutes later the Action will be called, at that time count or fetch all the attachments added and send email
.