4

How can I set up a query to search for records that were modified in the last 15 minutes? This is being used in Jitterbit dataloader not using apex. From most posts I have seen this doesn't seem possible.

Another idea I had was use a formula that would mark a boolean field as true if record was modified in last 15 minutes. However, I had no luck with the formula either.

Does anyone have a workaround or solution?

4
  • 4
    Couldn't you just make the formula number of minutes? – Adrian Larson Feb 17 '16 at 22:52
  • 1
    What didn't work with the formula field approach? It should work, although once you get too far beyond ~100k records the performance would slowly drop off, since you can't index a non-deterministic formula like this. – ca_peterson Feb 18 '16 at 3:09
  • 1
    I use jitterbit for an operation that runs daily, and reads/writes to a custom setting to store/update the 'last run date/time' so that i can use that value in my query filter in jitterbit, to filter only records modified since my last run date, and to avoid the non-selective query on large object error that would happen when you get near 100k records as ca_peterson indicates above. I dont see any reason you couldnt do that every 15 minutes. Can post more info / complete answer if helpful. – gorav Feb 26 '16 at 0:15
  • 1
    Sorry just realized you are using the JB data loader and not their paid product, which is what we are using. I don't think the data loader let's you do multi step operations. – gorav Feb 26 '16 at 0:40
5

I was able to make the following Minutes_Since_Modified__c formula work:

(NOW() - LastModifiedDate) * 24 * 60

Then I was able to query for it:

SELECT Id FROM Account WHERE Minutes_Since_Modified__c < 15
1
  • very useful for my integration work, less integration functions. Thanks. – Pasan Eeriyagama Jun 14 '18 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.