I am using the extension Salesforce connect to connect google sheets to Salesforce. I have to write a SOQL query to get all events grouped by event owner and import it ti google sheet using Salesforce connect. Its hard to write a query on event, some fields like status are in activities. Please advice how to get events from salesforce using SOQL query and including fields like status in the query
Asked
Active
Viewed 117 times
1
-
Correct, Events don't have Status. Tasks can be not started/in progress/completed but events... "just are"? they're completed when End Date is in the past. Unless you created a custom field the question is unclear, what exactly are you trying to do. – eyescream Apr 11 '22 at 19:04
-
I am trying to get events where status = show/no show/meeting scheduled. I can do this in report. There is a status field but i need to write a soql query to do this – Ruby Khan Apr 11 '22 at 22:30
-
What's the report type. "Tasks and Events", "Events with Invitees" or if something custom - can you check it in Setup -> Report Types? "Tasks and Events" will show a Status column but it'll be Task-related, for Event rows it's should be empty. Unless you added custom `Status__c` field I guess. If you're using "Events with Invitees" - check https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_eventattendee.htm out – eyescream Apr 12 '22 at 06:26
-
What do you get with `SELECT FIELDS(ALL) FROM Event LIMIT 200`? Or `FIELDS(CUSTOM)`? https://developer.salesforce.com/docs/atlas.en-us.236.0.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_fields.htm – eyescream Apr 12 '22 at 06:30