Deprecated: Assigning the return value of new by reference is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 248

Strict Standards: Non-static method GoogleSitemapGenerator::Enable() should not be called statically in /home/warped/public_html/sfdc-heretic/wp-content/plugins/sitemap.php on line 2452
Salesforce Heretic » Progmatic Access to Salesforce.com Reports

April 10, 2006

Progmatic Access to Salesforce.com Reports

Filed under: Howto, Salesforce.com — heretic @ 8:51 am

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

Every once in awhile the topic gets broached on the Salesforce.com forums about getting access to reports via the API. Still no dice on that though, but there are a few tips and tricks you can use to get your data — if you’re willing to work for it.

There are three main ways to access your report data from Salesforce.com. First, is via a CSV (comma seperated values) file, the second by parsing their HTML output, or third just throw the user at the report URL. But how do you know what report you want to throw at the user? (If you know the report ID you can skip ahead a bit.)
You’re in luck. Kinda. While the report list is not exposed via a nice API call, or object list (yet? please?), you can access an XML document with the list of reports. The URL is https://na1.salesforce.com/servlet/servlet.ReportList. (Change na1 as needed for your instance: ssl, emea, jp, test) While logged into the app, go ahead and take a look.

You’ll see the format is a series of report elements wrapped in a result element in the XML document. Each report element has 2 properties, foldername, and name (the report name). The report element has at least 1 child, url, as well as optional children id, isPublic, and description. You’ll find description elements on standard reports, while id and isPublic elements are on custom reports. The values should be relatively self-explanatory, I won’t get into a disseration on them here. :)

At this point you’ll need to get this XML document into your application to process it. If your app is in-browser (AJAX sepcifically), you shouldn’t need to do anything special. If your app is standalone you’ll need some tricks to get working. First, I’ll assume that you’re using the API in some fashion and have a valid session ID. You’ll need to request the ReportList page from the Salesforce.com server, but if you don’t have a valid session ID in the HTTP request you’ll get back an XML document with an empty result set. Before you make the HTTP request to the SFDC server, set the cookie ’sid’ to the value of your valid session ID from the API server. You should then get an accurate XML document.

Once you have your XML document you’ll need to parse it for the information to display to the user. We’ll leave that as an exersice for the reader, or you can google for XML parsers. At the end of the story you want either the ID of the report, for custom reports, or the URL provided for a standard report.

So we have the report ID/URL now how do we get the data out? Well, if all you want to do is throw the user at the regular Salesforce.com report page, you can send them to the url from the stock report, or take the id of the report and append it to your instance name: https://na1.salesforce.com/{!id}. Easy enough. But what if you want to do something progmatic with the data?

If we want a CSV file or a stripped down HTML file (ever wonder what ‘Export to Excel’ does?) we need to build up a URL. First, the URL will start with your instance name: https://na1.salesforce.com for exmaple. You’ll append the URL or ID next: https://na1.salesforce.com/00O30000000xxxx or https://na1.salesforce.com/00O?view=d&rt=13&details=yes&break0=LEV2 for an example stock report. From that point we’ll continue to build our URL with some parameters.

First we’ll need to set 2 parameters on the URL, export and enc to tell the SFDC server to return us the exported data (export=1) and the encoding to UTF-8 (enc=UTF-8). Next we need to identify the format for the data, CSV or HTML. (Side Note: Neat trick, and a tip o’ the hat to the folks at SFDC who came up with this one. Did you know the Export to Excel command doesn’t actually export a native Excel file? It’s actually a stripped down HTML document marked up with MS stylesheet notations and an .XLS extension. Brilliant idea to get around figuring out the Excel binary file format!)

The format parameter to our URL is called xf. It can be either of csv or xls. Quick reminder when building our URL. If you are using a standard report, there are already parameters passed to the server on the URL you have so far, not so on the URL you’ve built from the report id. HTTP parameters are passed in the URL delimited by a ? for the first parameter and an & for each subsequent one.

So to get our CSV data for a custom report we have a URL that might look like this: https://na1.salesforce.com/00O30000000xxxx?export=1&enc=UTF-8&xf=csv or for a standard report like this: https://na1.salesforce.com/00O?view=d&snip&export=1&enc=UTF-8&xf=csv

Our HTML/Excel format would look like this: https://na1.salesforce.com/00O30000000xxxx?export=1&enc=UTF-8&xf=xls or for a standard report like this: https://na1.salesforce.com/00O?view=d&snip&export=1&enc=UTF-8&xf=xls

(Please note I’ve truncated the standard report URL to fit nicely on the page here.)

At this point you have your report list in XML and your data in CSV/HTML. At this point if you’re still thinking about using this method to integrate report data I must admit, you’re a brave soul. Be sure to have some Tylenol, Advil, or mabye even Morphene handy. Hopefully this will give you a good start, but before you take the leap, make sure you really need to do this.

License

This work is published under a Creative Commons Attribution-ShareAlike 2.5 License.


Strict Standards: Only variables should be assigned by reference in /home/warped/public_html/sfdc-heretic/wp-includes/functions.php on line 590
« The Elusive Five 9’s  
Strict Standards: Only variables should be assigned by reference in /home/warped/public_html/sfdc-heretic/wp-includes/functions.php on line 590
Mail Merge - The Third Rail of Salesforce.com »

19 Comments


  1. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    When using these helpful tips, remember that because salesforce.com has chosen not to publish its reporting API, any of the techniques, field id’s, and other variables are subject to change without notice.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    David Claiborne — April 10, 2006 @ 6:09 pm


  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    Absolutely. But then again, that’s kinda the point of this blog - and alot of my work in general. I’m told, too frequently, honestly, “just get it done.” Hence why I do a number of ‘unsupported’ things. This amoung them.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    heretic — April 10, 2006 @ 7:49 pm


  3. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    If I’m running a custom link that puts a value into the report to narrow it down to a named users data only then this method won’t work.

    e.g. https://na1.salesforce.com/00O30000xxxxxxx?export=1&enc=UTF-8&xf=csv

    works fine but…..

    https://na1.salesforce.com/00O30000xxxxxxx?pv0=TEST+SYTEM?export=1&enc=UTF-8&xf=csv

    doesn’t work at all.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    Christopher — April 13, 2006 @ 10:07 am


  4. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    Christopher,

    I believe it may be because you have 2 ? marks as delimeters.

    You have:

    /00O30000xxxxxxx?pvo=TEST+SYSTEM?export=1 (…)

    When you probibly need:

    /00O30000xxxxxxx?pvo=TEST+SYSTEM&export=1 (…)

    Do remember that only the first parameter is prefixed by a ?, the rest by an &.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    heretic — April 13, 2006 @ 10:33 am


  5. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    That now works. Thanks very much. This is a brilliant piece of code. Does exactly what I want and I can already think of numerous ways it can help.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    Christopher — April 18, 2006 @ 10:31 am


  6. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    This is a great reference, thanks for taking the time to explain things a bit. I do have a bit of a newbie question though:

    When accessing the url for a custom report through a browser, I get the CSV file, however, when trying to access the url via an InputStream in Java, I get their login redirect page. (I don’t want to post the result here due to JavaScript, etc.)

    So here’s the question: While I can log in successfully using the API, how can you access the generated CSV file via Java?

    Thanks,
    Stu

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    Stu — April 18, 2006 @ 4:39 pm


  7. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    Stu - I’d hardly call that a newbie question.

    What you need to do is take the SessionID that you have (either passed from an Scontrol or from LoginResult) and when you construct your HTTP call add a cookie. Set the name of the cookie to “sid” and pass the SessionID as it’s value. That’ll bypass the login page.

    Make note however that any HTTP calls you make in your app to the UI should check for a new sid cookie set on the result. (That would indicate your session is > 50% on it’s way to being expired.) If you get a new sid cookie set on the return, save the sessionID (and restart your timer, if using one). You can use that new sessionID on both your UI and API calls.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    heretic — April 18, 2006 @ 5:07 pm


  8. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    have you figured out how to hack the dashboards? Is there an xml that lists the dashboards too?

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    howard — April 21, 2006 @ 12:13 pm


  9. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    Unfortunately I don’t believe they expose the dashboard information at all. :(

    The reason the XML is there for the reports is for use in their Excel plugin to import a report into Excel, from Excel. (The plugin needs to know what reports are available, afterall.)

    Since there’s no corresponding need to do the same with Dashboards I doubt there is a servlet to expose that.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    heretic — April 21, 2006 @ 12:33 pm


  10. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    We just implemented your report reader hack in c#. Works a treat. We are considering opensourcing these classes - if you think we should please let me know!

    Cheers
    Gareth.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    Gareth Davies — May 16, 2006 @ 7:13 am


  11. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    I love the info!

    However I am having some issues setting the SID in my XMLHttpRequest call. Wondering if you can give me some pointers?

    http2.open(’get’, ‘https://na1.salesforce.com/servlet/servlet.ReportList’, true);
    http2.setRequestHeader(”sid”, sforceClient.sessionId);
    http2.onreadystatechange = handleResponse2;
    http2.send(null);

    Thanks in advance for any help

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    Tinman44 — July 27, 2006 @ 12:30 pm


  12. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    Tinman44 — It looks like you are just setting an HTTP header with the sid in it… What you need to do is set a cookie and send the sid as a cookie (named sid).

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    heretic — July 27, 2006 @ 1:29 pm


  13. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    So at the risk of sounding like a total newbie how would you go about doing that? I have my cookie set on my page. I am just falling down at how I would “send that cookie”:

    sforceClient.login(’user’,'password’);
    document.cookie = “sid=” +sforceClient.sessionId;

    then how do I get it in the XMLhttpREquest?

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    Tinman44 — July 27, 2006 @ 1:52 pm


  14. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    The article is very helpful. Thanks for sharing, heretic.
    However, the csv format data is not enough for me. I want more lower level information, such as “query string used to generate the report”, “name of tables and columns and conditions used to generate the report”, etc. Is it possible for me to access these infomation from some URL?
    Thanks in advance.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    passtu — August 1, 2006 @ 1:53 pm


  15. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    Tinman44 - Unfortunately I don’t use JS internally to access the document, but I belive that if the user is actually logged into the UI the cookie should be set automatically for the outbound XMLRequest. I could be wrong.

    passtu - Not that I’m aware of, and that’s something I’d be highly surprised to see exposed. My impression is that the only reason this information is exposed is because it is needed for the SFDC Excel plugin. Because that tool doens’t need to know the information at that detail, it’s probibly not exposed.

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    heretic — August 2, 2006 @ 10:43 am


  16. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    I try to get XML document but each time, i have the following exception : Server returned HTTP response code: 500 for URL: https://na1.salesforce.com/servlet/servlet.ReportList.
    However i have had the cookie named “sid” with my SessionId as value. I have verified that cookie is well registered in my browser. When i go to this url when i’m logged i can see the XML document in the browser.

    I think it’s a problem with my cookie.
    Someone can help me please?
    Thanks

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    LaurentM — August 4, 2006 @ 2:08 am


  17. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    Report Scraping…

    Back in April, the Salesforce Heretic, wrote up a method to programatically pull data out of Salesforce.com reprots (covered here). Gareth Davies, founder and CEO of Upside-Outcomes (covered by Salesforce here), recently sent me a note that he created …

    Trackback by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    SalesForceWatch.com — August 23, 2006 @ 3:15 pm


  18. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    Been working on this again and would like to add the url to get the printable view. All you need to do is add excel=1.

    e.g.
    https://na1.salesforce.com/00O30000000xxxx?excel=1

    Make sure your browser has the correct permissions

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    Christopher — January 24, 2007 @ 5:15 am


  19. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 260

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 261

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 262

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-content/plugins/codesnippet/codesnippet.php on line 263

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/warped/public_html/sfdc-heretic/wp-includes/functions-formatting.php on line 76

    Has anyone figured out how to determine the datatypes of the results or sources (entities) from which the reports are derrived?

    Comment by
    Deprecated: Function ereg() is deprecated in /home/warped/public_html/sfdc-heretic/wp-content/plugins/google-analyticator.php on line 272
    Ryan — May 14, 2007 @ 1:57 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.