+ Start a Discussion


I want to make sure that I fully understand this functionality. The API takes a Calendar instance for start and end dates for the GetUpdated and GetDeleted messages. The documentation explicitly talks about the time portions of the start and end dates, it specifies that the minutes are ignored, but it doesn't explicitly say anything about the date portion of these parameters. Is the date portion used as well such that I could get updates from a date range and not just a time range?

The reason I ask this is because I have code that makes some updates on Day1. I have code that checks for updates that have occurred since the beginning of Day1 but it returns no IDs. This happens some specified time period after the updates occur (from 15 minutes up to one day later). Is there a synchronization process that I should wait on? Are creates/updates/deletes via the API not immediately accessible by the getUpdated/getDeleted portion of the API?


Hi Jason

Even i am having trouble in getting this function i.,e getUpdated to work, I go online to the developer edition and change some thing to the existing objects, I come back to my client application , but i don't get back any ID's , I had posted this problem in this forum before but i didn't get any concrete solution for this. But i am bit confused about this time frame which getUpdated function takes.

Will let you know when i get this work done...

> Is the date portion used as well such that I could get updates from a date range and not just a time range?

Yes, the date range is used; the only limitation is that the date has to be within 30 days of the current time.

You should be seeing new/changed IDs almost immediately - I've done a bit of hacking in Java with these functions succesfully, so perhaps if you want to post some more details we can take a look..

hi adam

I appreciate if you could post some code to invoke the getUpdated function that would be really helpful,

I have the following code for the start time and end time (took the same example from the sforce)..

     Calendar serverTime = binding.getServerTimestamp().getTimestamp(); 
     GregorianCalendar startTime = (GregorianCalendar) serverTime; 
     GregorianCalendar endTime = (GregorianCalendar) serverTime;
     //subtract 5 mins from the server time so 
     //that we have a valid time frame, you can use just 
     //about any timespan you want, 5 minutes is arbitrary
     startTime.add(GregorianCalendar.MINUTE, -5);   

  System.out.println("Current Server Time: " + ((Calendar)serverTime).getTime());
  System.out.println("Start Time = " + ((Calendar)startTime).getTime());
  System.out.println("End Time = " + ((Calendar) endTime).getTime());


When i try to print the above ..it gives me the same time for start & end times... this could be the problem in getting the updated objects

let me know about this..


see http://forums.sforce.com/sforce/board/message?board.id=JAVA_development&message.id=1039&page=2