You need to sign in to do that
Don't have an account?
David Ovella
Why my approval process is sending emails with field values as blank?
Hello there, I'm trying to use an approval process to send emails to my customers.
But the email that I received has fields values as blank, does someone know why?
my approval process has an "email alert" and that email alert has a visualforce email template.
my vf email template
Buenos Días
Le envío el presupuesto solicitado:
Item 1
Total Gs.: IVA incl.
Total a Pagar Gs.: IVA incl.
Opcional costo de Delivey (Asunción) Gs.: 7.000 IVA incl. (Confirmar Servicio)
Archivo:
Plazo de Entrega: hs después de la confirmación
Forma de Pago:
Requiere Seña:
And It supposed to look like this:
Buenos Días
Le envío el presupuesto solicitado:
Item 1
tarjetas personales, 9x5cm, impresion digital color, una sola cara, papel ilustracion mate 300g.
Total Gs.: 312.000 IVA incl.
Total a Pagar Gs.: 312.000 IVA incl.
Opcional costo de Delivey (Asunción) Gs.: 7.000 IVA incl. (Confirmar Servicio)
Archivo: Ok
Plazo de Entrega: 24hs después de la confirmación
Forma de Pago: Contado
Requiere Seña: No (100% contra entrega)
my visualforce email template:
But the email that I received has fields values as blank, does someone know why?
my approval process has an "email alert" and that email alert has a visualforce email template.
my vf email template
<messaging:emailTemplate subject="{!relatedTo.Asunto_email__c}" recipientType="User" relatedToType="OT__c"> <messaging:htmlEmailBody > Buenos Días<br/><br/> Le envío el presupuesto solicitado:<br/><br/> <c:Envio_Email_Componente /> </messaging:htmlEmailBody> </messaging:emailTemplate>And I receive the email like this:
Buenos Días
Le envío el presupuesto solicitado:
Item 1
Total Gs.: IVA incl.
Total a Pagar Gs.: IVA incl.
Opcional costo de Delivey (Asunción) Gs.: 7.000 IVA incl. (Confirmar Servicio)
Archivo:
Plazo de Entrega: hs después de la confirmación
Forma de Pago:
Requiere Seña:
And It supposed to look like this:
Buenos Días
Le envío el presupuesto solicitado:
Item 1
tarjetas personales, 9x5cm, impresion digital color, una sola cara, papel ilustracion mate 300g.
Total Gs.: 312.000 IVA incl.
Total a Pagar Gs.: 312.000 IVA incl.
Opcional costo de Delivey (Asunción) Gs.: 7.000 IVA incl. (Confirmar Servicio)
Archivo: Ok
Plazo de Entrega: 24hs después de la confirmación
Forma de Pago: Contado
Requiere Seña: No (100% contra entrega)
my visualforce email template:
<apex:component controller="OTPresupuestoControllers" access="global"> <apex:repeat var="ot" value="{!cOTList}"> <table> <tr> <td><b>Item 1</b></td> </tr> <tr> <td><apex:outputText value="{!ot.OT.Texto_1_fact__c}"/></td> </tr> <tr> <td><apex:outputText value="{!ot.OT.Texto_largo_1_presup__c}"/></td> </tr> <tr> <td><u>Total Gs.:</u> <apex:outputText value=" {!ot.total1} IVA incl."/> </td> </tr> <tr> <td><b><apex:outputText value="Item 2"/></b></td> </tr> <tr> <td><apex:outputText value="{!ot.OT.Texto_2_fact__c}"/></td> </tr> <tr> <td><apex:outputText value="{!ot.OT.Texto_largo_2_presup__c}"/></td> </tr> <tr> <td><u><apex:outputText value="Total Gs.:"/></u> <apex:outputText value=" {!ot.total2} IVA incl.""/> </td> </tr> <tr> <td><b> <apex:outputText value="Total a Pagar Gs.: {!ot.totalapagar} IVA incl.""/> </b> </td> </tr> <tr> <td><b>Archivo: </b> <apex:outputText value=" {!ot.OT.Archivo__c}" /></td> </tr> <tr> <td><b>Plazo de Entrega: </b> <apex:outputText value=" {!ot.OT.Plazo_de_Entrega__c}hs después de la confirmación" /></td> </tr> <tr> <td><b>Forma de Pago: </b> <apex:outputText value=" {!ot.OT.Forma_de_Pago__c}" /></td> </tr> <tr> <td><b>Requiere Seña: </b> <apex:outputText value=" {!ot.OT.Requiere_Sena__c}" /></td> </tr> </table> </apex:repeat> </apex:component>
Code which you mention ,in that what you can do is . In component you need to create attribute like id , and in the VF template you need to pass the id for particular record.
For VF template you can reffer below example :
for component yuo can reffer below code: with help of currentopptyId in your controller class OTPresupuestoControllers you can query the related records and display it.
My apex class looks like this:
I probed your code:
and I did this in my component (the only way that let me save is with assignTo="{!cOTList.id}"), I tried assignTo="{!o.id}" and assignTo="{!OT__c.id}" but doesn't work.
and in my vf email template I did this:
And then I save it, but it gives me this error in my vf email template:
Error occurred trying to load the template for preview: List subscript must be an integer. Please try editing your markup to correct the problem.
I tried this (type="integer") but still show me that error.
By anychange you know?
thank you,
David
I was looking this publication and I'm trying to figure out how to make this works.
I still having trouble, and it is in the part of my apex, I don't know how to connect {!currentopptyId} to my Id in the apex class