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
sanjaykumarsanjaykumar 

last modified date

Hi All,
              I want to retrieve the records which were modifie after last run of my code , I am not getting the way how to perform it..
 
Please help..
 
Thanks in Advance
 
Sanjay
 
Gareth DaviesGareth Davies
Hi Sanjay,
 
Down load Datascope it lets you do exactly this. There is a free 10 day trial.
 
Alternativly you can manually set up a query usign the Excel connector.
 
Gareth.
sanjaykumarsanjaykumar

Thanks Gareth ,

but waht i actually wanetd is the way i can store my last run time and use the updated method and there use the start time as my last run time...

Hope u will be able to guide me..

Regards,

sanjay

SuperfellSuperfell
use the getUpdated method, or add a where LastModifiedDate > 2006-07-16T13:00:00Z clause to your query (where obviously the date part rolls forward as you re-run your code).
Gareth DaviesGareth Davies

Hi Sanjay,

sorry misunderstood your question. We've done this for a client who required a regular process to go through records, check which had changed, and then update a new "calculated field".

The calculated field was actually an mix of cross object look ups plus the external data (Bank of England base rate) so we could not go to calculated fields in SFDC when they became available in Summer 05.

What we did was to create a custom "Control" object where we recorded the time of the last start and stop of the update process. When it next awoke (we run this as system process) it would use this to determine which records to process. It gave us the added bonus that we could measure throughput and ensure that the process had completed as well.

Hope that helps
Gareth.

 

sanjaykumarsanjaykumar

Thanks Gareth,

                            That was really helpful, can u expalin me that how did u used that in the "UPDATED" method, I mean how you used that start time and end time.

Thanks a lot for your guidance.

Regards,

sanjay

sanjaykumarsanjaykumar

Thanks Simon,

But if the client user made some changes then how should i track them, caz i cant know the time frame in which he made the changes, and also the updated method needs the start and end time for it , How should I pass those times after every run of my code.

Regards,

sanjay

SuperfellSuperfell
You keep track (in a file / registery, whatever) of the last time you ran, then when you run next time, the timeframe you're interested in is last run -> now.
sanjaykumarsanjaykumar

Thanks Simon,

Can you explain me a little more on it.

Regards,

sanjay

Gareth DaviesGareth Davies
In our case we actually knew which objects and record types that we were interested in so we did not use getupdated method - which (I think) returns all object ids that have been updated. If you are planning a sychronisation of DB's this is what you should use.
 
We were looking only at specific types of Opportunities for a financial institution so we could use the LastModifiedDate field to select only opportunities that were modified since the last run of the update calculation. By keeping the persistence in salesforce.com (rather than registry/file) meant that we could install the update module on any computer and all maintenance could be run using the CONTROL object.
 
Gareth.
sanjaykumarsanjaykumar

Hi Gareth ,

I have done it using the GetUpdated and retrieve functon call, Thanks a lot for ur help and really u did Guide me very well..

keep it up

Thanks & Regards,

Sanjay

sanjaykumarsanjaykumar
Thanks Gareth, for all ur help..i will trouble you a little more..
now when i am able to do the logic part, i want to provide atab to the client on the salesforce ..which onclicking will run my application and perform the logic ..i know it has to be done with servlets , but can u guide me in steps to fullfill the requirments..

Thanks and Regards,
Sanjay
Gareth DaviesGareth Davies

setup->build->Custom Tabs.

Select to create new Web Tab

Pick full page or 2 column (next)

Then on next screen select tab Type URL.

Then build your URL in step 3 and assign to profiles in step 4 and step 5 add to tabs.

Gareth.

 

[If your code is an S-Control then the same as above but change Type URL to Type S-Control]