Volomeister Posted February 22, 2023 Report Share Posted February 22, 2023 Hi there. I needed to be able to execute an application task by clicking on a button on a DataPage. Since application tasks manually can be executed only on the back end of the application, here is a workaround I came up with using triggered action: 1. Create an auxiliary table with one Text 255 field: 2. Add one record to this table: 3. Create a triggered action on the auxiliary table that will run on update and will be executing the required task logic (in this example, it will be sending emails to users stored in the main table) 4. Now you can create a Details DataPage using the auxiliary table as a source with the following configurations: 4.1 Choose "Filter data based on your pre-defined criteria." 4.2 Select no filtering fields 4.3 On "Search and Report Wizard - Select Details Page Fields" choose Text 255 field from the table 4.4 Add header with the following CSS code snippet: <style> section div:not(.cbBackButtonContainer) { display: none; } </style> 4.5 Add the following JavaScript code snippet to the footer of your DataPage: <script> const alertMessage = 'Task was executed' document.addEventListener('click', (e)=>{ if(e.target.getAttribute('type')=='submit') { alert(alertMessage) } }, true) </script> 4.6 "Destination after record update" is set to the "Same form." With the aforementioned setup, you will get a DataPage with a single button that will trigger required actions upon click, which simulates application task behavior. DrSimi, Ilyrian and Jodie 2 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.