Skip to Content
0

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

Apr 30 at 12:36 PM

45

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Meghna Sharma May 02 at 10:58 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Janneth Torres May 04 at 12:01 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded