Hi All,
Are we aware of the issue where the new dialogs not working on the Document Dialog. The following sample piece of code works on the Before and After Save or the Appointment, Sale and Project entites (I am sure it would work on Company and Contact, but I have not tested this). However when using this script on the Document Before and After Save events, the dialog just does not show. The script fires, and can see it in the trace, but the dialog is not displayed.
#setLanguageLevel 3;
EventData ev = getEventData();
EventDataDialogDefinition dialog;
dialog.setTitle("Update Active Documents");
dialog.setType("yesno");
dialog.setIcon("question");
dialog.setPrefix("confirmUpdActDocuments_");
dialog.setText("There is already an active document for this document type and project. Do you want to make remove the active document status from the previous documents?");
ev.showDialog(dialog);
The only dialog I can get to show for the document is the ev.setMessage, I have tested this on the latest on site release of SuperOffice, and with SuperOffice online. Does anyone know when this will be available, I have a script to write for a customer that requires this, and at the moment I cannot get this to work.
Many thanks,
Trevor
Alle Svar (11)
I have noticed the same issue with the quote dialog, seems like the dialog functionality doesn't work everwhere in the CRM client (yet)
Hi David,
That is interesting, it would be good if we can get an idea from SuperOffice as to where adding the dialogs to these screens is in the roadmap.
Trevor
Hello,
First of all; script triggered dialog are not supported on BeforeSave and AfterSave triggers on Document and Quoteline dialogs.
There are two reasons for this:
- They are both written in the PageBuilder framework. This causes quite an effort and a need for custom code to solve. All SCIL based UI behaves the same way, but PageBuilder UI that will be ported to SCIL at some point requires individual customizations for each dialog. We took that investment on some PageBuilder dialogs (like appointment) because the use cases/requirements demanded it.
- The document dialog is very challenging to solve because it is actually “several dialogs”. Do you use webtools or not? Do you use SharePoint documents or not. When is save? When document record is created or updated or when the document is updated? Create document without webtools creates an empty document and then opens the document dialog where you can edit properties (open etc.) This does not happen if you have WebTools or SharePoint.
To make a long story short, we postponed this problem to be able to release script triggered dialogs as soon as possible. We are planning to address these challenges when we move these dialogs to SCIL.
At the moment, we do not know when this will happen.
For now a possible solution would be for the user to trigger these scripts from the task menu in the Document or Quote dialog.
Hi Erik,
Thanks for the update, definitley helps us by understanding why this is not working in the document dialog box, and to know that it will eventually be included in there, even if we do not yet have a date for this.
Many thanks,
Trevor
Thanks Tony, I have started using the new task menu's and I have to say they are really useful. The only thing I don't seem to be able to do is refresh SuperOffice after the script has run, I even tried adding "ev.setNavigateTo("soprotocol:refresh");", but that didn't refresh SuperOffice, at the moment, I show have an OK dialog at the end of the script asking the user to refresh their browser to see the changes made by the script.
Trevor
@Espen Steen, have created an issue to add a warning about this in docs.
https://github.com/SuperOfficeDocs/feedback/issues/124
Best regards.
EDIT: This issue has been addressed, and a warning will appear in the next docs release.