• Shrutika
  • NEWBIE
  • 0 Points
  • Member since 2017
  • Vyomlabs

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
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.

When am passing LinkedEntityId with any hardcoded incident id, then it is fetching ContentDocumentId and working

But  when passing any list / Id variable LinkedEntityId not fetches  ContentDocumentId .

 SELECT ContentDocumentId,LinkedEntityId FROM ContentDocumentLink WHERE LinkedEntityId =: InciId / 

SELECT ContentDocumentId,LinkedEntityId FROM ContentDocumentLink 
                           WHERE LinkedEntityId in:incidentIDList (List where inc id's are stored)