Object Reference for the Salesforce Platform
Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
TopicAssignment
Administrators must enable topics for objects before users can add topics to records of that object type. Topics for most objects are available in API version 30.0 and later. Topics for ContentDocument are available in API version 37.0 and later.
Supported Calls
create(), describeSObjects(), delete(), getDeleted(), getUpdate(), query(), retrieve()
Fields
| Field Name | Details |
|---|---|
| EntityId |
|
| EntityKeyPrefix |
|
| EntityType |
|
| NetworkId |
|
| TopicId |
|
Usage
Use this object to query the assignments of topics to feed items, records, or files. To assign or remove topics, you must have the “Assign Topics” permission.
In SOQL SELECT syntax, this object supports nested semi-joins, allowing queries on Knowledge articles assigned to specific topics. For example:
1SELECT parentId FROM KnowledgeArticleViewStat
2 WHERE parentId in (SELECT KnowledgeArticleId FROM KnowledgeArticleVersion
3 WHERE publishStatus = 'Online' AND language = 'en_US'
4 AND Id in (select EntityId from TopicAssignment where TopicId ='0T0xx0000000xxx'))There is no SOQL limit if the logged-in user has the “View All Data” permission. If they do have that permission, do one of the following:
- Specify a LIMIT clause of 1,100 records or fewer.
- Filter on Id or Entity when using a WHERE clause with "=".
Deleting this object's records removes all its data. This action is irreversible.
Important
When you create a report type on the TopicAssignment object, all queries are generated in SQL, which does not enforce the 1,100 record limit clause.
Note