5 réponses
I see few issues The User.Name field is not related to the Event object. You need to join the Event object with the User object using a relationship field, such as OwnerId.You have multiple FROM statements in your query, which is not allowed. You can only have one FROM statement in a SOQL query, and it should specify the object you are querying.The list of fields after the FROM statement should not include StartDateTime, Subject, Hotel__c, etc. Those fields should be included in the list of fields after the SELECT statement. Here is a corrected version of your SOQL query:
This query selects the OwnerId and Owner.Name fields from the Event object, and filters the results to show only events that have a StartDateTime value in the last month.SELECT OwnerId, Owner.Name, StartDateTime, Subject, Hotel_c, Activityc, Notesc, Donec, Completedc, Cancelledc, Postponed_c
FROM Event
WHERE StartDateTime = LAST_MONTH