• Mihir Kumar 15
  • 0 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 0

I have written a trigger on ContentDocumentLinkobject to cover the below scenario:

1. If there is a ContentDocumentLink record created with a ContentDocumentId & Entity ID is of MessagingSession object, and
2. MessagingSession record referred in Entity ID has a case linked to it then

A new ContentDocumentLink record is created to link the ContentDocumentId and the case related to MessagingSession record referred in EntityID.

Now, I don't know how to write the test class of the same as I am not finding way to create MessagingSession record. Kindly help.