Popup windows(text) with workflow - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17) +--- Forum: User Support (https://discussions.corebos.org/forumdisplay.php?fid=6) +--- Thread: Popup windows(text) with workflow (/showthread.php?tid=2476) |
Popup windows(text) with workflow - Joana - 12-06-2022 I would like to create a workflow that opens a popup window with text and two options. For example: This sales quote is invoiced. Make invoice: YES / NO Thank RE: Popup windows(text) with workflow - xh.shazivari - 12-14-2022 (12-06-2022, 12:22 PM)Joana Wrote: I would like to create a workflow that opens a popup window with text and two options. Hello! 1. Create a Business Action, type: DETAILVIEWHTML which allows us to execute any script that we want. Link URL: <script> function doWeInvoice() { if (confirm('This Sales Quote is invoiced')) { runBAWorkflow(workflowid, $RECORD$); } } </script> This script contains the function which is used to display the modal dialog with an optional message and two buttons. In the runBAWorkflow function, as a first parameter, you have to put the id of the workflow which will create the Invoice. The workflow should be set to 'System. Mass Actions' and the workflow task type should be 'Convert Inventory Module Records', where you select the module for which you will create records(in this case 'Invoice'). 2. Then to trigger this popup, you have to create another Business Action, type DETAILVIEWBUTTON or DETAILVIEWBASIC Link URL:javascript:doWeInvoice() 3. In this Business Action, you can put a Business Rule to define if you want to show this button or not. For example Create a Business Map, type : Condition Expression Content: <map><expression>if invoiced == '1' then 1 else 0 end</expression></map> So, in this case when the status of the sales order is ‘Invoiced’, the button will show and you can call the popup otherwise it will be hidden. Hope it helps! Let us know |