web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error sending PDF by m...
Power Apps
Unanswered

Error sending PDF by mail, the pdf is repeated.

(1) ShareShare
ReportReport
Posted on by 139

An excellent morning for everyone. A week ago I had no problems sending a PDF file generated with the PDF function. The APP generates a PDF that must be sent to a user. The first time it generates the example PDF PDF1 and sends normally. But when I generate another email with other data, it sends the PDF1 file again.

 

 

 

Set(
 varverPDF5;
 true
);;
Set(
 varPDF5;
 PDF(
 PDFRAC;
 {
 Size: PaperSize.A4;
 Margin: "10px 10px 10px 70px";
 ExpandContainers: false
 }
 )
);;
If(
 CBNivelRiesgo.Selected.Value = "ALTO";
 Office365Outlook.SendEmailV2(
 EmailSSOMAC.Text;
 "RAC de Riesgo " & CBNivelRiesgo.Selected.Value & "reportado a " & CBEmpresaReportada.Selected.Contratistas;
 "Es necesario que tomes accion inmediata en el levantamiento del reporte de acto o condicion subestandar evidenciado ya que podria generar un daño a las vidas que tenemos a nuestro cargo";
 {
 Importance: "Alta";
 Cc: EmailResidente_1.Text;
 Attachments: Table(
 {
 ContentBytes: varPDF5;
 Name: "RAC" & LblRAC.Text & " " & "para" & CBEmpresaReportada.Selected.Contratistas & ".pdf"
 }
 )
 }
 );
 false
);;
Office365Outlook.SendEmailV2(
 EmailSSOMAC.Text;
 "RAC de Riesgo " & CBNivelRiesgo.Selected.Value & "reportado a " & CBEmpresaReportada.Selected.Contratistas;
 "Es necesario que tomes accion inmediata en el levantamiento del RAC";
 {
 Importance: CBNivelRiesgo.Selected.Value;
 Attachments: Table(
 {
 ContentBytes: varPDF5;
 Name: "RAC" & LblRAC.Text & " " & "para" & CBEmpresaReportada.Selected.Contratistas & ".pdf"
 }
 )
 }
);;
Set(
 varverPDF5;
 false
);;
If(
 Comproy4_3.Selected.Value = "SI";
 Office365Outlook.SendEmailV2(
 TextN2_1.Text & ";" & TextN2_2.Text & ";" & TextN2_3.Text & ";" & TextN2_4.Text;
 "Aviso de Penalidad por " & CbInfraccion.Selected.Value;
 "Estimado/a " & CBEmpresaReportada.Selected.Contratistas & ". Queremos informarte que hemos aplicado una penalidad de S/." & Comproy4_2.Selected.Value & " debido a una " & CbInfraccion.Selected.Value & " que se ha cometido. Nuestro equipo ha revisado detenidamente el incidente y, lamentablemente, hemos concluido que la acción tomada constituye una violación de nuestras políticas.";
 {
 Importance: "Alta";
 Cc: "eaguinaga@abril.pe;;sjustiniani@abril.pe;;" & TIEmailOT.Text;
 Attachments: Table(
 {
 ContentBytes: varPDF5;
 Name: "Amonestacion a " & CBEmpresaReportada.Selected.Contratistas & ".pdf"
 }
 )
 }
 );
 false
);;
Reset(CBProyecto);;
Reset(CBSupervisor);;
Reset(CBEmpresa);;
Reset(TILugar);;
Reset(CBNivelRiesgo);;
Reset(CBEmpresaReportada);;
Reset(CBObservacion);;
Reset(CBNivelRiesgo);;
Reset(TIDescripcionAC);;
Reset(TIPlanAccion);;
Reset(ACFechaLevan);;
Reset(AddAC);;
Reset(Comproy4_3);;
Navigate(ActosCondiciones)

 

 

 

Very grateful for your support.

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard