cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to get the document from the Library to attach it to an email?

former_member340372
Discoverer
0 Kudos

Dear Experts,

I need to get a document from the Library to attach it to the "PDI BADI to provide attachment to email" enhancement, but I can't find a way to obtain the library file content. I use the QueryByElements of the Document object to retrieve the file from the name, but I can only get the UUID of the Document object. Is there any way to recover its content?

Thanks in advance,


Regards,

Janneth.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

Hello Janneth,

You are almost there. In the resultset.GetFirst(), go inside the node "VersionFileVariant" and then again access the association "VersionFileVariantContent", where "BinaryObject" field will have the file content in Base64 format. If you have multiple versions of the file then the same can be checked in "VersionFileVariant" node and accordingly the content for the required version can be accessed. If you havent maintained any version then you can just use GetFirst() for the "versionFileVariant" node.

Hope it helps.

Thanks & Regards,

Meghna

former_member340372
Discoverer
0 Kudos

Hello Meghna,

Thank you very much for the response :), I did tests with the indications you gave me and I was able to recover the contents of the file, I had tried to do it using the association with the version but it was empty, again thank you I had not found information about it, I was about to give up and look for another solution,

Regards,

Janneth Torres