You need to sign in to do that
Don't have an account?

Get Report Results with SOQL?
Hello- I'm new to Salesforce, an experienced developer otherwise.
I have been provided with a Salesforce account with a simple list of customers in it, and a report I'd like to get the contents of (built by someone else)
I now have Perl Salesforce::Simple working, connecting to the account, and listing some fundemental objects. ( I don't know what they mean yet!) I'd like to execute this report and recieve the result back.
The way Salesforce::Simple works is that it just wraps a SOQL query. Some type information is there, but I dont have to deal with it if I don't have to... Far, far simpler than the whole SOAP/WSDL model.
shortest route from A to B?
thanks in advance
-Brian
I have been provided with a Salesforce account with a simple list of customers in it, and a report I'd like to get the contents of (built by someone else)
I now have Perl Salesforce::Simple working, connecting to the account, and listing some fundemental objects. ( I don't know what they mean yet!) I'd like to execute this report and recieve the result back.
The way Salesforce::Simple works is that it just wraps a SOQL query. Some type information is there, but I dont have to deal with it if I don't have to... Far, far simpler than the whole SOAP/WSDL model.
shortest route from A to B?
thanks in advance
-Brian
but back to the Report in question. It queries Accounts, using just four rules. (1 or 3) and (2 or 4). It selects most all fields from the Account, but no, not all.
I queried the Account object in Perl , but that is just the field names for an account object, not a way to get the Accounts themselves.
As far as the SOQL, I appreciate pointers on how to to begin the query. If I have to replicate the report using SOQL, then so be it. It really isn't that much.
thanks in advance
-Brian
yes, of course... the report generates a list of accounts fitting some criteria. The criteria are on simple fields, like ProgramType is X or ProgramType is Y.
the Accounts are names of business' (plural of business :-) with most all of the fields defined for them listed.. not quite every one though...
very SQL like. I am sure this can be done! I just a) can't find the report object, if that's usable, or b) dont know how to start the SOQL query on accounts..
I do have the apex_api manual open.. but where to start?
thanks
-Brian
So you'll have to reproduce the report through SOQL.
Look throught the SOQL documentation, for examples, but I imagine you'll want a query similar to
"select name, site from Account where ProgramType__c = 'foo' " or something similar, and where foo is constructed on the fly.
Here's a link to the SOQL section in the docs
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql.htm
its just called Account? hmmm
nothing to further specify?
> where ProgramType__c = 'foo'
I see these __c things around here and there.. could someone say what that means?
> link
yes, thanks, and I am looking there.. I needed to find out more about the nouns here, I suppose, before I can use the syntax well...
http://sfdc-heretic.warped-minds.com/2006/04/10/progmatic-access-to-salesforcecom-reports/
(and look at the comments for some free example code).
Best
Gareth.
meanwhile, after looking at the Report definition (quite simple, fortunately, just a lot of custom field names), and using the excellent SoqlXplorer, I was able to craft a SOQL query that did what I needed it to..
So I got back the response as an array of named elements.. seems to work fine.. I can deal with it for now.
I am using WWW::Salesforce::Simple from CPAN in Perl.
I am connected to the API, I am getting a token response, I want to query a report in which I have a list of my clients. This report lists my clients with their name, email, date_added , etc. I need to do something like Select name, email where date_added > Yesterday. and get a json response.
is this possible? if so how?