Skip to Content

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 02 at 10:58 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • May 04 at 12:01 PM

    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

    Add comment
    10|10000 characters needed characters exceeded