class Salesforce::Rails::API::CalendarEvent
Public Class Methods
all()
click to toggle source
Returns all calendar events.
Salesforce::Rails::API::CalendarEvent.all #=> [#<Event @Id="1", ...>, #<Event @Id="2", ...>, #<Event @Id="3", ...>, ...]
# File lib/salesforce/rails/api/calendar_event.rb, line 11 def all client.query("SELECT Id, Subject, IsAllDayEvent, StartDateTime, EndDateTime, Description, Owner.Name, ShowAs FROM Event") end
query(where_expr)
click to toggle source
Returns a collection of events of self that match the conditional where_expr
, which is the WHERE part of a SOQL query.
Salesforce::Rails::API::CalendarEvent.query("Name = 'test'") #=> [#<Event @Id="1", @Name="test", ...>, #<Event @Id="2", @Name="test", ...>, #<Event @Id="3", @Name="test", ...>, ...]
# File lib/salesforce/rails/api/calendar_event.rb, line 18 def query(where_expr) client.query("SELECT Id, Subject, IsAllDayEvent, StartDateTime, EndDateTime, Description, Owner.Name, ShowAs FROM Event WHERE #{where_expr}") end