function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Velvett FoggVelvett Fogg 

Trouble polling assets

The next step for me in our companies integration with SF is to poll the SF tables and bring down to the local data the changes made during a specific time frame.  So far, Accounts and Contacts are not a problem.  Where I do have issues is with the Asset table.  When I use getUpdated() against the Asset table, I am returned an error. ( 15:56:22.022 - com.sforce.soap.enterprise.fault.InvalidSObjectFault Exception ) 

 

My base programming language is ColdFusion, but I'm extending it with Java. Java is what is actually doing the communication between me and SF.   So far I've had wonderful progress with this project.  Up until this apparent anomaly with Assets. 

Ron HessRon Hess
check that the asset table is "replicatable", if it is not, you need to use the sysmoddate and not getUpdated()
darozdaroz

Ron Hess wrote:
check that the asset table is "replicatable", if it is not, you need to use the sysmoddate and not getUpdated()



I tend to discourage the use of the getUpdated call in general anyway. In a real word situation unless you don't care about the object that was updated other then to only know that it was in fact updated there's no reason to use the call:

A query call filtering on sysModstamp has the same time granularity as the getUpdated call with the only added overhead of the parsing of the query string and the retrevial of the additional fields. You save time by only having to make one call to the API -- your select call (filtered by sysModstamp) can return the same info as getUpdated (the ID of the updated object) in addition to 0 or more of the fields you may want to know about. (Any added overhead of the query parsing is made more then moot if the query returns records.)

In a near-realtime replication situation across a large number of objects the ability to potentially cut your API calls by one-half is a significant performance boost, both for SFDC and us.
Velvett FoggVelvett Fogg

Daroz,

I get what you are saying about not using getUpdated().  I've taken your advice and am trying to make this work just using a query.  It seems as if I am not "allowed" to use either systemModStamp or lastModifiedDate.  Runing either of these queries

Select id from Account Where lastModifiedDate > '{ts '2005-05-25 08:19:12'}'

Select id from Account Where systemModStamp > '{ts '2005-05-25 08:19:12'}'

gives me the following error:

com.sforce.soap.enterprise.fault.MalformedQueryFault Exception

I hope you can shed some light on this for me.

Thanks for your replies

SuperfellSuperfell
You need to use an iso8601 formated date, e.g.

Select id from Account Where systemModStamp > 2005-05-25T08:19:12Z