function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Klaus SchgagulerKlaus Schgaguler 

Write to FeedTrackedChange

I tried to insert a FeedTrackedChange in an APEX Trigger:

 

FeedTrackedChange ftc = new FeedTrackedChange();
...
insert ftc;	

I get the following error: DML operation INSERT not allowed on  FeedTrackedChange.

 

Does that mean I am not allowed to write any FeedTrackedChange from custom triggers or is there a workaround for this task?

 

 

rwoollenrwoollen

FeedTrackedChanges are always system-generated.  eg if you change an account record, the system will generate the corresponding FeedTrackedChange.

 

Can you give some more information on what you're trying to do?

Klaus SchgagulerKlaus Schgaguler

Thanks for your answer. I know about the normal system generation of a FeedTrackedChange.

I was trying to build a chatter notification of an object change triggered by my own criterion