Updating and Deleting Records in Salesforce using REST API -
ax1.salesforce.com/services/data/v29.0/sobjects/account/updated/?start=2015-06-30t06%3a49%3a00%2b00%3a00&end=2015-06-30t16%3a30%3a26%2b00%3a00
this seems typical update query , delete query similar above
the response query of form:
"ids": [ "0019000001qeoinaa3" ], "latestdatecovered": "2015-06-30t09:00:00.000+0000" }
the main problem here latestdatecovered parameter:
it doesn't return exact time due reasons mentioned in following link:
https://help.salesforce.com/apex/htviewsolution?id=000199029&language=en_us
so instead of can use lastmodifieddate parameter update this: https://ap1.salesforce.com/services/data/v30.0/query?q=select%20lastmodifieddate%2cname%20from%20account%20where%20lastmodifieddate>2015-07-01t10%3a04%3a00.000%2b0000
i store lastmodifieddate parameter(highest of records) , same
both queries yield same results right
infact secondly mentioned 1 gives better results
i can proceed same right?
will there problem?
you want add id of account soql query similar data rest equivalent of getupdated() replication api call.
have read of what difference between lastmodifieddate , systemmodstamp?. may find systemmodstamp more appropriate.
from why getupdatedresult.latestdatecovered not updating or changing long periods of time? article link to.
"if salesforce executes long-running transaction on instance, value in field start time of long-running transaction until completes. because long-running transaction might affect user data (for example, batch processing)."
so, salesforce returning conservative latestdatecovered make allowances transactions may not have completed yet.
how suitable either approach depend on planning results. might want consider streaming api if want monitor records changing on shorter period of time. e.g. user session.
by way, salesforce stackexchange site great place ask salesforce specific questions.
Comments
Post a Comment