I wanted to populate the due date on an Advanced P...
# ask-stanley-ai
a
I wanted to populate the due date on an Advanced PDF/HTML Template which is 14 days later than the date of the invoice. How do I do this?
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To populate the due date on an Advanced PDF/HTML Template which is 14 days later than the date of the invoice, you can use a custom field with a formula. Here's how you can do it: 1. Create a new custom field (let's call it
custbody_due_date_plus_14
). This field should be of type 'Date' and should be placed on the transaction record type that you are working with (e.g., Invoice). 2. In the 'Formula' field of the custom field definition, use a SQL formula to add 14 days to the transaction date. The formula would look something like this:
ADD_DATE({trandate}, INTERVAL 14 DAY)
. This formula adds 14 days to the transaction date (
trandate
). 3. Save the custom field. 4. In your Advanced PDF/HTML Template, you can now reference this new field using the syntax
${record.custbody_due_date_plus_14}
. This will print the due date which is 14 days later than the date of the invoice. Please note that this solution assumes that you are using the standard
trandate
field for your invoice date. If you are using a different field, you will need to adjust the formula accordingly.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845020056
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840429246
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.839589596
Please provide your feedback on this answer.