+ Start a Discussion
Zander ZumbrunnenZander Zumbrunnen 

Account Name in Event Subject is Duplicating

Hi all,

We noticed an annoying problem with Events created from Apex.

User-added image

This event was created by a custom Apex class we use in an LWC for scheduling. Here is the code for that. 

User-added image

The subject for the example event was simply "PAD/TCHA/HSA". The Account name gets added automatically which is wanted, but not that many times.

Is there a reason this is happening? I notice now that I am missing (cacheable=true) since this is returning the Id but would that be the cause of the problem?

Any information on Events would be helpful, I feel like this object has barely any helpful documentation out there.
Zander ZumbrunnenZander Zumbrunnen
Scratch the (cacheable=true), that prevents the event from being created...
Maharajan CMaharajan C
Hi Zander,

It's looks like there is a some JS code from your LWC component or someother automation( Trigger, Flow or Process builder)  doing this changes.

Please check the above thing to fix this issue.

cacheable=true is not an also it won't allow you to perform the dml inside apex method.

Thanks,
Maharajan.C