I want to create a custom "Reject" button that tri...
# ask-stanley-ai
m
I want to create a custom "Reject" button that triggers the voided process of a transaction through a workflow, instead of doing it manually. Need action script ?
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that you can create a custom "Reject" button that triggers the voided process of a transaction through a workflow by using a combination of SuiteScript, Suitelet, and workflows. Here's a general approach: 1. Add a custom button via workflow. This button will be used to reject the transaction. 2. On the click of this button, transition to another state in the workflow. 3. In this new state, use a custom workflow action script that calls a Suitelet. 4. This Suitelet will prompt the user for input (e.g., a "rejection reason"). The Suitelet also saves this input to the record. 5. You can also set a checkbox along with setting the Rejection Reason in the record. The workflow can then use this flag to transition or not. 6. You can also create a custom record (e.g., "Rejections") with fields like Reason, Transaction (is Parent), Created By, and Rejected By. 7. Create two workflows: one for the action on the Rejection State (which redirects to the Rejections record), and another one for setting field values for Created By & Rejected By, redirecting the Approver back to the original Transaction, and sending an email notification to Created By, from Rejected By, with the {reason} value in the body. Please note that this is a general approach and you might need to adjust it according to your specific requirements. ****** 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.848062277
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841193795
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838797271
Please provide your feedback on this answer.
Thank you for your feedback