Lawtex: How do I submit a PDF of the piece via email?

2

I have a template that sends an email at the end, in the extra, and I'm having trouble getting it.

The email sending code is:

sendMail(<advogadoDoCaso.emailAdvResponsavel>, “Atenção, já está disponível a prévia com testemunhas do processo nº ” & <dadosDoProcesso.numerodoprocesso> & “. \b\b Acesse ” & documentInfo(<docInfo.link>, “pdf”) & ” e visualize o documento.”)

The struct of docInfo is this:

-<docInfo> : struct[DocumentInfo] {
    fields {
        +[link] : String
    }
}

I have tried in many ways, such as calling documentInfo outside sendEmail, but I am not able to make it work, because the email is sent with the field blank, as if there was no link

    
asked by anonymous 06.12.2018 / 16:38

2 answers

2

The problem with your code is that you are using <docInfo.link> in the DocumentInfo call.

As it expects a struct and you passed only one text field, it returns empty, so its result is empty.

You have two ways to solve this: 1) use documentInfo(<docInfo>, “pdf”) in the email call, and as your struct only has one field, link , it will only print this information (if it had other fields, it would print one after the other, separated by a comma) p>

2) before sendMail , call documentInfo(<docInfo>, “pdf”) and send email only use this code: sendMail(<advogadoDoCaso.emailAdvResponsavel>, “Atenção, já está disponível a prévia com testemunhas do processo nº ” & <dadosDoProcesso.numerodoprocesso> & “. \b\b Acesse ” & <docInfo.link> & ” e visualize o documento.”)

    
06.12.2018 / 16:42
2

Use documentInfo before sendmail . It serves to retrieve information about a specific doc, or the current document.

    
06.12.2018 / 16:47