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

Offline edition data access via XML api?
I need to create reports in the offline version.
Is there a way to access the the offline line data via the XML API or other means with i.e. Crystal Reports? |
All Answers
The clients team is going to kill me (you know who you are), but yes, you can gain access to the offline data store.
There are a few ways to go about it, depending on what tech you are using, but the easiest is to use the OfficeToolkit (same as the offline client).
The trick is the Route property on the session.
Setting the value to true routes all calls to the offline db.
This is an unsupported api but you can do quite a bit through it (normal officetoolkit functions).
You can also use the officetoolkit in offline mod to query the db directly using SQL 92. The results are in XML.
Other options are to use a standard WSDL client (requires registry mods and you have to know what is supported and what is not in the offline api) or to throw SOAP calls against the offline datastore com component…
Will this functionality ever be added to the offline edition?
Someone already posted the idea: http://ideas.salesforce.com/article/show/10095358/Offline_Edition__Enable_Reports
Thank you foghorn that is good news. Seems pretty strait forward, just need to figure out how to log into salesforce offline. I think I need to have a session before I can change its property. Login() does not seem to support the route property.
My users are working in very remote areas with no internet connection within miles.
Thanks again,
Matt
The entire sequence is....
create an instance of the toolkit
set the route property high
call login as you normally would. If the user has not synced their offline datastore login should tell you (or maybe not, i have not worked on that in a while).
You should also try syncing a user first using offline directly, then trying the offline api login steps.
I am using
C:\Program Files\salesforce.com\OfficeToolkit\4.0\SF_MSApi4.dll
with C#.net app and
m_SForceSession4Class.Route = true;
But when I call
QueryResultSet4 qr = m_SForceSession4Class.Query("select name from Contact", false);
Gives the following exception.
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Any ideas what is wrong?
Hi flagrant99
Did you ever get this working? I have tried with the vb code below (using the Office Tookit 4.0 in Excel) and although the login works fine, I cant retrieve any records. It errors on the QueryOfflineDB() function and returns the error "Object Required"