Can you create a button via a workflow that refres...
# ask-stanley-ai
a
Can you create a button via a workflow that refreshes a page, or does that require a UE and Client script combination?
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that you can create a button via a workflow that refreshes a page, but it would require a combination of User Event (UE) and Client Script. Here's a brief overview of how you can achieve this: 1. Create a hidden field in the record, for example, "Show Import Button". 2. In the Client Script, upon clicking of the Preview button, you can force the page to refresh after submitting a true value in your hidden field. 3. Then with the right conditions in Before Load in User Event, you can show the Import and Preview buttons. Here's a code snippet that was shared in the conversation:
Copy code
code
document.forms[0].submit();     // TO POST THE FORM
window.onbeforeunload = null    // TO REMOVE DIALOGUE BOX FROM BROWSER
This code is used to submit the form and refresh the page without showing a dialogue box from the browser. Remember, this approach requires a combination of both User Event and Client Script. ****** 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.837362885
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830186307
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828573346
Please provide your feedback on this answer.