You need to sign in to do that
Don't have an account?
Sharsch
Get all fields of event
Hi,
I am using query something like this
select ActivityDateTime, Description , Subject , Location from Event where OwnerId = '" + userId + "'";
I want to a select query that will will give me all the fields not just ActivityDateTime, Description and Subject.
In SQL terms I mean select * from Event where ownerid = 'userid' ;
Please let me know.
Thanks,
Sharsch
Message Edited by Sharsch on 08-04-2008 02:36 PM
I am using query something like this
select ActivityDateTime, Description , Subject , Location from Event where OwnerId = '" + userId + "'";
I want to a select query that will will give me all the fields not just ActivityDateTime, Description and Subject.
In SQL terms I mean select * from Event where ownerid = 'userid' ;
Please let me know.
Thanks,
Sharsch
Message Edited by Sharsch on 08-04-2008 02:36 PM
For example, DescribeSObject("Event") will return you a DescribeSObjectResult object. In that result object, there will be a list of Fields in an array as one of the properties. With that array listing of all the fields, you can dynamically construct your SELECT statement.
Here is the API reference documentation link for the DescribeSObject api call:
http://www.salesforce.com/us/developer/docs/api/index_CSH.htm#sforce_api_calls_describesobjects.htm
I found Apex Explorer which made my task easier. It gave me required SOQL statement and also I was able to graphically see all the fields that are under event (user defined and inbuilt).