Has anyone figured out how to determine the datatypes of the results or sources (entities) from which the reports are derrived?]]>
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.
Make sure your browser has the correct permissions]]>
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 …]]>
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?
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.]]>
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.
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”:
document.cookie = “sid=” +sforceClient.sessionId;
then how do I get it in the XMLhttpREquest?]]>
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).]]>
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.onreadystatechange = handleResponse2;
Thanks in advance for any help]]>
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!