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
Jakob BerntssonJakob Berntsson 

EmailMessage relation to FeedItem

Hi!

I'm trying to create a Flow for merging cases. The idea is simply to update the related records that can be re-parented, and copy the rest. We have "Enable Case Feed Actions and Feed Items" enabled, so all emails appear as FeedItem records with type EmailMessageEvent.

My problem is this: for emails I'm copying the EmailMessage record and the FeedItem records with type EmailMessageEvent. The problem is that I can't seem to find how these two records are related. The FeedItem record contains no reference to the EmailMessage record, and vice versa.

I'm thinking if there might be some other object that contains references to both the EmailMessage and FeedItem, and that is what ties them together, but I have yet been able to find something like this in the Object Reference.

Can someone help me find out what I'm missing here? Thanks in advance!

Best regards,
Jakob Berntsson
swathi krishnamurthy 35swathi krishnamurthy 35
Hi, 
Did you figure this out? Were you able to create a Feed Items for EmailMessage?
 
Jaap van der MolenJaap van der Molen
I'm looking for this too
Jakob BerntssonJakob Berntsson
Hi! I never managed to solve this, unfortunately.

I think I worked around it by creating a new TextPost FeedItem record if the original EmailMessageEvent FeedItem record had any related FeedComments. Not a perfect solution since there's no relation to the EmailMessage record, but good enough for my company's user case.

Nowadays I'm however using the new official Case Merge instead, which does what I tried to do in my flow and Apex classes but better.