I am using render.mergeEmail, with a vendor bill I...
# ask-stanley-ai
t
I am using render.mergeEmail, with a vendor bill Id, In the template there is a {transactionnumber} field, it is not filling that info in template.
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like the issue you're facing is related to the way you're using the
render.mergeEmail
function. When using this function, you need to pass the transaction id as a parameter. This is done by adding
transactionId: id
to the function call. Here is an example:
Copy code
javascript
var mergeResult = render.mergeEmail({
    templateId: 12,
    transactionId: journalEntry.id
});
In your case, you should replace
journalEntry.id
with the id of the vendor bill you're working with. Also, it's important to note that the
relatedRecords
parameter in the
email.send
function is used to attach the email to the record so you can see it in the record's emails. It doesn't affect the email template merge using
render.mergeEmail
. As for the
{transactionnumber}
field in your template, it should be replaced with the actual field name from the vendor bill record. For example, if the field name is
tranid
, you should use
${transaction.tranid}
in your template. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.848005116
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.847427726
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.842315257
Please provide your feedback on this answer.