+ Start a Discussion
Justin LonisJustin Lonis 

Trigger Formula for Articles

Hi, is there any way to have a trigger formula so any time an agent attached an article internally to a case on the articles related list that article would come up in the case feed as a comment? 

Thanks, 
pconpcon
It does not look like you can.  You would have to be able to trigger on the CaseArticle object which does not allow triggers.  You can always vote for this idea [1] and maybe it'll get delivered (or maybe not).

Otherwise you could write some scheduled apex [2] (I'd suggest looking at Relax [3]).  Then schedule a job every X number of minutes to look for any CaseArticle objects created since the last time it ran and then write them out as a CaseComment object.  I would recommend storing the last time it ran in a Custom Setting [4] so that you can easily get the time back as well as make it easier to test / debug.

[1] https://success.salesforce.com/ideaView?id=08730000000izXWAAY
[2] http://blog.deadlypenguin.com/blog/2012/05/26/scheduled-actions-in-salesforce-with-apex/
[3] https://github.com/zachelrath/Relax
[4] http://help.salesforce.com/HTViewHelpDoc?id=cs_about.htm&language=en_US (http://help.salesforce.com/HTViewHelpDoc?id=cs_about.htm&language=en_US)