What I was trying to do
I created an “After request saved” trigger that uses a yes/no EventDataDialogDefinition to display a dialog asking the user whether they want to send an email when the ticket status is changed, on mobile CRM.
What I expected to happen
I expected the dialog to appear every time the ticket status is changed in Mobile CRM.
What actually happened
In the online CRM version, everything works as expected.
In Mobile CRM, the behavior is inconsistent:
-
When changing the status using the pen icon and updating it that way, the trigger runs and the dialog opens.
-
When changing the status using quick change or the top-right options button, the trigger does not behave the same.
-
With “After saving request”, the trigger does not run at all.
-
I then tested additional trigger types (“Request changed status” and “Request saved”). These triggers did run when updating via quick change / options, but the dialog did not open.
-
Steps to reproduce the problem
-
Create an "After request saved", “Request saved”, or "Request changed status" trigger that uses EventDataDialogDefinition to open a yes/no dialog.
-
Open a request in Mobile CRM.
-
Change the status via the pen icon → dialog opens.
-
Change the status via quick change or the options button → trigger may run, but the dialog does not appear.
#setLanguageLevel 4;
// Displays delete ticket yes/no dialog
Void DisplayDialog(EventData ed)
{
// Display dialog
EventDataDialogDefinition dialog;
dialog.setIcon("question");
dialog.setType("yesno");
dialog.setPrefix("openDialog_");
dialog.setTitle("Some title");
dialog.setText("Some text");
ed.showDialog(dialog);
}
EventData ed = getEventData();
String dialogResponse = ed.getInputValue("openDialog_button");
if (dialogResponse.isEmpty())
DisplayDialog(ed);
// Do nothing
if (dialogResponse == "no")
return;
if (dialogResponse == "yes")
// Send email
Question
Is this intended behavior in Mobile CRM, or could this be a potential bug?
Alle Svar (2)
Hi Eivind,
This might be related to this bug, please evaluate tracing results in Mobile and/or in Desktop and compare:
https://community.superoffice.com/en/product-releases/bugs-wishes/product-issue/?bid=89507&azure=1
Hi Bas,
That matches what I’m seeing as well. In my tests, the input value that normally gets added when using an EventDataDialogDefinition (e.g. "openDialog_button": "no") was missing entirely on both desktop and mobile when using the “Saving a request” or “Request status changed” triggers. Since that value never appeared, the dialog didn’t open in those cases.
Using “After saving request” does work when changing the status via the pen icon, but the challenge is that my customer wants the dialog to appear specifically when using the quick edit. That method doesn’t seem to add the input value or trigger the dialog at all.
What I get when changing status:
{
"type": 0,
"inputValues": {
"contactId": "37458",
"entryId": "2419",
"personId": "83659",
"ticketId": "2419",
"ticketStatus.new": "20",
"ticketStatus.old": "1"
},
"blockExecution": false,
"navigateTo": "",
"message": "",
"showDialog": "",
"outputValues": {},
"stateValues": {}
}
What I expected:
{
"type": 0,
"inputValues": {
"contactId": "37458",
"entryId": "2419",
"personId": "83659",
"ticketId": "2419",
"ticketStatus.new": "20",
"ticketStatus.old": "1",
"openDialog_button": "yes/no"
},
"blockExecution": false,
"navigateTo": "",
"message": "",
"showDialog": "",
"outputValues": {},
"stateValues": {}
}