Error: Service call CustomerService.ExecuteEventHandlers failed

lock
push_pin
done
Besvarat
7

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

15. nov. 2023 | 11:46 fm

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.

 

15. nov. 2023 | 03:32 em

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!

and sorry I forgotten to say, this Message "Service call CustomerService.ExecuteEventHandlers failed" happens by Trigger After saving appointment

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.

 

 

17. nov. 2023 | 12:47 em
Hi Tony, thanks for your Info. Which Bug ID is that? it only affects Appointments or also other Agent? Since we have more changing userdefiend Fields in our crm scripts. it is important for us to fix. Thanks!
Hi Tony

We also have several customers with the same problem, where the CRM Script breaks when AppointmentAgent.SaveAppointmentEntity is called, including on our own tenant. I would like to know the bug id as well, cause this is pretty critical, and seems to have happened after the new update was rolled out on friday.

I can get around some functions with search engine updates as a hotfix for, but for creating new ones, it's a bit more critical to use the actual agent to ensure all business logic is followed.

:(
20. nov. 2023 | 04:15 em

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.

21. nov. 2023 | 12:31 em

Lägg till svar