You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How would one use Unit of Work to create ContentDocumentLink records?
For example:
Insert sObject record (registerNew)
Insert ContentVersion record (registerNew)
Insert ContentDocumentLink (registerNew - but with ContentVersion.ContentDocumentId)
Using registerNew(contentDocLink, ContentDocumentLink.ContentDocumentId, contentVersion) obviously doesn't work because we need the ID of the Content Document, not the Content Version. It would be nice if the library could handle these object without the need to add custom code.
However, I know there are many other high-priority issues, and for now I would be happy if anyone could provide a bit of guidance on how to implement this myself. I saw blog post comment that suggested doing this in a custom IDoWork method, but I'm not at all clear on how that could be accomplished. I couldn't find anything in the linked documentation or through online searches.
Thanks!
The text was updated successfully, but these errors were encountered:
@lindsayholmes-gears could one of the extensibility features of UOW such as a IDoDML or virtual methods - but used to add this behavior - it does feel quite specific to add directly.
How would one use Unit of Work to create ContentDocumentLink records?
For example:
Using registerNew(contentDocLink, ContentDocumentLink.ContentDocumentId, contentVersion) obviously doesn't work because we need the ID of the Content Document, not the Content Version. It would be nice if the library could handle these object without the need to add custom code.
However, I know there are many other high-priority issues, and for now I would be happy if anyone could provide a bit of guidance on how to implement this myself. I saw blog post comment that suggested doing this in a custom IDoWork method, but I'm not at all clear on how that could be accomplished. I couldn't find anything in the linked documentation or through online searches.
Thanks!
The text was updated successfully, but these errors were encountered: