0

Please find my scenario below

I will talk in generic words so that the objects name should not confuse someone. I have written after insert trigger on an object and obviously, I am getting the Id of the record in the trigger but when I am going to insert that Id in another object but during this, I am getting internal salesforce.com error.

Do anyone have any idea why it is happening?

My understanding is that its okay we are able to get the Id of the record but it will not be available till the trigger is not going to complete. It may be reason, I want another opinion.

Object details -

  • I have written the trigger on ContentDocumentLink (after insert). It fires when we upload a file to Libraries tab then I use the ContentDocumentId from the current record of ContentDocumentLink to insert it into ContentDocumentLink object with more users Ids(means more sharing) and here it fails with internal salesforce.com error.

Thanks!

4
  • 2
    Pretty hard to say why this is happening for you but possibly due to recursion. Can you provide your trigger logic?
    – TSmith
    Apr 12, 2017 at 10:59
  • @TSmith - thanks for the reply. I have mentioned it in the Object details section of my question. do you need some more information? Apr 12, 2017 at 11:00
  • 2
    Can you provide the code so the community members can get a better understanding of the issue?
    – TSmith
    Apr 12, 2017 at 11:03
  • Sorry for this, due to some boundation I can not expose the code. Apr 12, 2017 at 11:08

0

You must log in to answer this question.