Print this page

Why does the getDeleted API call not return deleted TopicAssignment records?

Knowledge Article Number 000182385
Description We are trying to fetch TopicAssignment records removed in the last 5 minutes, but getDeleted() on TopicAssignment does not returns any results, even if a topic has been removed from a FeedItem. Is this a bug?
Resolution A TopicAssignment record is hard-deleted when you explicitly delete a FeedItem or a Topic associated with it. That's why no TopicAssignment record is retrieved by the getDeleted() call. However, if you delete a record having FeedItem records, TopicAssigment records which are depending on the FeedItem records will be soft-deleted. In this case, you will see that the TopicAssignment records can be retrieved from the getDeleted() method.

For example, if you add FeedItem records with Topics to an Account record, then explicitly delete the Account record, the Account record is soft-deleted (in other words, the Account record is moved to the Recycle Bin) and the FeedItem records and related TopicAssignment records get to be soft-deleted so that they can be recovered when the Account record gets undeleted. In this case, TopicAssignment records can be retrieved by the getDeleted() API call. 

promote demote