Skip to main content
When a Lead is Converted and the resulting Contact is attached to an existing Account, an automated Chatter post is created on the Account (Type=TrackedChange).  I wrote a Trigger on Account to automatically delete that Chatter post as soon as it is created.  Works great.  I'm writing test coverage now, but it appears that the automated Chatter post is NOT being created when I do the Lead Conversion in the test coverage context.  Is anyone familiar with this?  Is there a way to make the automated Chatter post appear, or does this simply not happen in test coverage?
7 respostas
  1. 5 de jun. de 2018, 22:45
    Chris you are right about the DisableFeedTrackingHeader, I thought it was also exposed in Apex. 

    It appears that Apex tests do not commit changes to the DB and without committing changes to the DB the Feed Tracked Change will not be generated. It doesn't seem like it will be possible to write a test for this apex trigger. 
0/9000