function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
WazWaz 

[[Getting an error]]Error: Compile Error: No such column 'Name' on entity 'Event'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name.

Hi,

I am trying to have me events show up on my  custom javascript calendar my apex code is:

User-added image
I am very new to salesforce and developing as well. Can someone help me out?
Amit Chaudhary 8Amit Chaudhary 8
Please update your line 48 and remove Name field
 
for( Event eve : [ select id,StartDate,EndDate from Event where isActive = true ] ) {

Let us know if this will help you
 
Mammu4Mammu4
Hi,
On event object- Name(WhoId) refers to Contact/Lead Id
If yo want to get Contact/Lead Name Use Who.Name for your query.
Hope it helps!

-Thanks
 
Amit Chaudhary 8Amit Chaudhary 8
Please update your line 49 and remove Name field
for( Event eve : [ select id,StartDate,EndDate from Event where isActive = true ] ) {

And remove line 54.

Let us know if this will help you