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

Range of dateTime values for GetUpdated/GetDeleted is not clear

The documentation is not clear on a couple subtle but important points about the dateTime values.

Is the range inclusive, exclusive or mixed? I'd expect the startDate to be inclusive and the endDate to be exclusive (so that a subsequent call could use the endDate as the new startDate). If not, then there is the risk of the same object ID being returned in two consecutive (and presumably disjoint) requests. This could happen when the seconds portion of the object's LastModifiedDate is zero.

I noted that the seconds portion of the startDate and endDate are ignored. Is the seconds portion of the object's timestamp similarly ignored? If so, this could provide a work-around for the first problem. Either way, this should be clearly documented.

Does leaving blank one or both of the dateTime values give an open-ended search? If not, this would be a reasonable feature to add in the next release.


One final note: the Usage section of the doc for both calls mentioned "updatedDate", which is not defined. This should get changed to reflect startDate, endDate, and the answers to the above questions.



Hi Nick,

I think the doc clearly states that the time values are inclusive:

  • The sforce Web service truncates the seconds portion of dateTime values. For example, if a client application submits a timespan between 12:30:15 (GMT) and 12:35:15 (GMT), then the sforce Web service retrieves information about items that have changed between 12:30:00 (GMT) and 12:35:00 (GMT), inclusive.
  • Although open ended search is in explicit, I can think of ways to work around that.

    Thanks for the heads up on the documentation inconsistency.  Late changes to functionality and all.  Will file a doc bug to have this corrected.



another question concerning getupdated()

is there a limit on the timespan? when i query for the accounts or contacts updated the latest two days sforce returns me about 57 000 account id's !

and i can ensure you, 99% of these 57 000 records has really not been updated. When i query for the latest 10 hours the id's returned are correct, when for the latest 11 hours i again get 57 000 id's returned.

is this strange? or am i just using an oversized timespan?

thanks in advance