in a workflow, an action sends out an email messag...
# ask-stanley-ai
m
in a workflow, an action sends out an email message also, in the same time I want to send the rejection reason in this email message the rejection reason is an additional custom record how can I include the latest rejection reason in the email body?
c
AI generated answer (using internal Slack threads):
In order to include the latest rejection reason in the email body of a workflow action, you can follow these steps: 1. Create a custom record (let's call it "Rejections") with fields: Reason, Transaction (is Parent), Created By & Rejected By. 2. Create a workflow (WF#1) with an action on the Rejection State that redirects to the Rejections record. The approver can enter comments regarding the rejection in a Long Text box and save. 3. Create a second workflow (WF#2) with the record type set to "Rejection". This workflow sets field values for Created By & Rejected By, redirects the approver back to the original transaction, and sends an email notification to the Created By user, from the Rejected By user, with the {reason} value in the body. 4. To send the email back to the original creator of the transaction upon its rejection, you can create a workflow field "Created By", then create an action on entry to set Created by=user. This workflow field can then be used in the recipient part of the email action. 5. If you're having trouble finding the Created By workflow field in the recipient field, it should be under the from field > current record > Created By (Workflow). 6. If the Created By workflow field doesn't show up as an option, make sure you've created a workflow field, not a state field. State fields only exist in the state you are in, while "Workflow" fields are always available to any state. Please note that the workflow field ID starts with custworkflow, while a state field ID starts with custwfstate. ****** 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.844192564
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840263426
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836283743
Please provide your feedback on this answer.