how can i restrict a button from showing on a tran...
# ask-stanley-ai
v
how can i restrict a button from showing on a transaction if the posting period is closed
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 restrict a button from showing on a transaction if the posting period is closed, you can create a scheduled workflow that runs every 30 minutes. This workflow should have a saved search criteria where the Accounting Period status is set to 'closed'. Then, within this workflow, you can have an action that marks a custom checkbox (let's call it 'period closed') as true (T). After setting up this workflow, you can use the 'period closed' custom checkbox as a condition for your button action in other workflows. This means that the button will only show if the 'period closed' checkbox is not marked (i.e., the posting period is not closed). Here is a simplified version of how you can set up the workflow: 1. Create a scheduled workflow with a saved search criteria where Accounting Period status = 'closed'. 2. Add an action in this workflow that marks a custom checkbox ('period closed') as true (T). 3. In your other workflows, use the 'period closed' checkbox as a condition for your button action. Please note that this solution updates every 30 minutes, which may not be ideal for real-time changes, but it should work for most cases. Also, be aware that users with the 'Override Period Restrictions' permission will still be able to post transactions even if the period is closed. If you want to keep this permission but also want to display a warning popup when the period is closed, you might need to create a separate workflow for that.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.833435178
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832885742
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826660156
Please provide your feedback on this answer.