Update Trigger on ContentVersion object are not invoked when updating ContentVersion object
Last updated 2022-02-10 ·Reference W-3741660 ·Reported By 5 users
Summary
Update-triggers which are defined for ContentVersion are never invoked if an update statement to a ContentVersion object is issued after linking a document with a public library by creating a ContentWorkspaceDoc object.
Repro
1. Following psuedo apex code can be used to reproduce the issue.
ContentVersion cv = new ContentVersion();
initializeFields(cv);
insert cv;
cv = reloadContentVersion(cv.id);
ContentWorkspaceDoc workspaceDoc = new ContentWorkspaceDoc();
workspaceDoc.ContentDocumentId = cv.ContentDocumentId;
workspaceDoc.ContentWorkspaceId = getWorkspaceId();
insert workspaceDoc;
modifyFields(cv);
update cv; // Triggers on ContentVersion are not invoked on this update statement.
Workaround
NA
Reported By (5)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.