Hi,
I want to get LastModifiedDate or Last Edit Date of feature layer through javascript api v3.2. How do I achieve that?
Thanks,
Kamal
Solved! Go to Solution.
Kamal,
For that you would use esriRequest to get the json result for the rest endpoint that you are picturing in your image.
require([
"esri/request", ...
], function(esriRequest, ... ) {
var layerUrl = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0";
var layersRequest = esriRequest({
url: layerUrl,
content: { f: "json" },
handleAs: "json",
callbackParamName: "callback"
});
layersRequest.then(
function(response) {
console.log("Success: ", response);
}, function(error) {
console.log("Error: ", error.message);
});
...
});
Kamal,
Are you saying that your feature layer has a field for LastModifiedDate or Last Edit Date?
Please see attachment below
Kamal,
For that you would use esriRequest to get the json result for the rest endpoint that you are picturing in your image.
require([
"esri/request", ...
], function(esriRequest, ... ) {
var layerUrl = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0";
var layersRequest = esriRequest({
url: layerUrl,
content: { f: "json" },
handleAs: "json",
callbackParamName: "callback"
});
layersRequest.then(
function(response) {
console.log("Success: ", response);
}, function(error) {
console.log("Error: ", error.message);
});
...
});
Thanks Robert. It works like a charm.
Can I achieve same thing through arcgis runtime iOS sdk v100.0 ?. I have put query related to this to new thread:
Thanks,
Kamal
Kamal,
Be sure to mark this question as answered. I don't know runtime stuff so some one there will have to answer that.