Hi,
We have some crm scripts in SO Cloud.
we got today reported by our User, some Message or Error Message was posted in SuperOffice after he called the Logik in crm scripts:
For Trigger Before saving sale, it comes Error: The value is not a valid number
For Trigger Before saving appointment, it comes Message: Service call CustomerService.ExecuteEventHandlers failed
and then the process is broken. Such Message is not implemented by us in crm scripts, they are from SuperOffice.
Does anyone know what it caused by and how could we fix it?
Thanks!
- Jianchun
Allt Svar (7)
Hi Jianchun,
It's very likely the BeforeSave CRMScript Triggers are throwing an exception and not being caught and handled in the script itself, and the UI presents a sign there was a problem.
Best practice is to implement some try catch error handling in your scripts and present the user with more instructive error messages.
Best regards.
Hi Tony,
I checked my scripts row by row and find which rows here caused the Message "Service call CustomerService.ExecuteEventHandlers failed", where I want to set Userdefined Fields of Follow-ups. I have set the Try/Catch Block in the Rows but it cannot catch this error as you see below in Screenshots.
Earlier changing and saving userdefiend Fields via this way still works, but now it popup this Message instead of my User-Message from the Scripts. Is there anything changed by Updates of SO Cloud?
thanks!
Hi Jianchun,
Unfortunately your use of AppointmentAgent.SaveAppointmentEntity in CRMScript appears to be a bug that is hard to consistently reproduce.
It works in some tenants, but not in others. We have not been able to identity the cause of the problem.
Sorry for the inconvenience.
Hi!
It only fails on existing appointments loaded and then saved via CRMScript. It seemed random only until it was realized to be related to a serialization issue NSTimeZoneRule, so only those with Timezones enabled and used would experience the problem.
R&D has submitted a fix and plans to deploy a hotfix very soon.
The bug is not published on community.