You need to sign in to do that
Don't have an account?
O2O Simon
Select data from ActivityHistory
Hi,
I am trying to add a new button in Lead detail page, to view all the activity history with subject equals to "Call".
This is the query string i used in the S-controls :
var queryResult = sforce.connection.query("Select ActivityDate, Description, Subject, Status from ActivityHistories Where Subject = 'Call' And Status = 'Completed' And id='{!Lead.Id}' ");
But it failed, could anyone suggests what is the problem of the query string?
Thank you very much.
Simon
I am trying to add a new button in Lead detail page, to view all the activity history with subject equals to "Call".
This is the query string i used in the S-controls :
var queryResult = sforce.connection.query("Select ActivityDate, Description, Subject, Status from ActivityHistories Where Subject = 'Call' And Status = 'Completed' And id='{!Lead.Id}' ");
But it failed, could anyone suggests what is the problem of the query string?
Thank you very much.
Simon
I don't think you can use activityhistory as a query table, you probably need to use Task.
var queryResult = sforce.connection.query("Select ActivityDate, Description, Subject, Status from Task Where Subject = 'Call' And Status = 'Completed' And ActivityDate < Today And id='{!Lead.Id}' ");
select id, subject, (select subject, activityDate from activityHistories) from case
Message Edited by SimonF on 09-21-2008 10:15 PM