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
afwafw 

WorkThanks.FeedItem getting null

Hi all, 

I followed this article "How to Give Thanks via Apex (https://help.salesforce.com/articleView?id=000199013&type=1" target="_blank)" to give badges.
It is working fine.

However, I'm getting null value for WorkThanks.FeedItem.Id in
[Select w.Message, w.FeedItem.Id From WorkThanks w].
I am gettting correct value in Post.RelatedRecordId but I am not able to filter by RelatedRecordId, 
[Select f.RelatedRecordId, f.Id, f.Body From FeedItem f Where f.RelatedRecordId = :thanksId]
Am I missing anything?
How do I link both tables. I tried to set,  
thanks.FeedItem = post;
but gives me error "Field is not writeable"

Thanks,
afwafw
could you guys please help me with this.
Thanks,