Hello! This is cross-posted in the new Flownatic slack, but thought I'd check here. I am trying to build a Flow which moves a file from one object to another. I know this is simple with updating the Content Document Link, but the catch here is that I only want to copy the most recent version. Here are the main things I've tried:
-change "Content Version" records to IsDeleted = True (won't let me do it)
-create new Content Document (via assignment as you can't just straight up create a record) and delete old one
I think I'm on the right track with the second one, but I get hung up because a new Content Document requires a field called "VersionData," and I get this error if I try to pull it from the original Content Document to use in the new one: "INVALID_TYPE_ON_FIELD_IN_RECORD: Version Data: value not of required type: core.filemanager.FileBlobValue@60a9a7fc"
I think I need to do some type of conversation of the VersionData field - I think maybe it's text on the old one and needs to be some other thing (binary?) on the new. Please help - I'm not a coder at all! I imagine it's a simple Apex action but I'm lost. Thanks!
Hi ,
Please check this article.
content version - clone from one object to another
https://developer.salesforce.com/forums/?id=9060G0000005qKOQAY