function findId(){
var query = " ";
$().SPServices({
operation: "GetListItems",
async: false,
listName: “List Name”,
CAMLQuery: query,
CAMLRowLimit:1,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var last_item_id = $(this).attr("ows_ID");
return last_item_id;
});
}
});//SPServices Ends
}//FindId Method Ends.
For additional information and updates on SPServices check Mark D Anderson's http://spservices.codeplex.com .
var query = "
$().SPServices({
operation: "GetListItems",
async: false,
listName: “List Name”,
CAMLQuery: query,
CAMLRowLimit:1,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var last_item_id = $(this).attr("ows_ID");
return last_item_id;
});
}
});//SPServices Ends
}//FindId Method Ends.
For additional information and updates on SPServices check Mark D Anderson's http://spservices.codeplex.com .
Thanks. I am getting first row values.
ReplyDelete