getting Modified and Created Field value
Posted: 18 Nov 2014
hi Dmitry,
I need created and Modified field value.
ı found a code block that you mentioned. But this code returns only Editor and Author field values.
İs it possible to get date field value with the same code.
SP.SOD.executeOrDelayUntilScriptLoaded((function () {
var ctx = new SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getById(_spPageContextInfo.pageListId);
var item = list.getItemById(parseInt(GetUrlKeyValue('ID')));
ctx.load(item);
ctx.executeQueryAsync(function() {
alert('Author: ' +
item.get_item('Author').get_lookupId() +
' - ' +
item.get_item('Author').get_lookupValue() +
'\nEditor: ' +
item.get_item('Editor').get_lookupId() +
' - ' +
item.get_item('Editor').get_lookupValue());
});
}), "SP.js");
I need created and Modified field value.
ı found a code block that you mentioned. But this code returns only Editor and Author field values.
İs it possible to get date field value with the same code.
SP.SOD.executeOrDelayUntilScriptLoaded((function () {
var ctx = new SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getById(_spPageContextInfo.pageListId);
var item = list.getItemById(parseInt(GetUrlKeyValue('ID')));
ctx.load(item);
ctx.executeQueryAsync(function() {
alert('Author: ' +
item.get_item('Author').get_lookupId() +
' - ' +
item.get_item('Author').get_lookupValue() +
'\nEditor: ' +
item.get_item('Editor').get_lookupId() +
' - ' +
item.get_item('Editor').get_lookupValue());
});
}), "SP.js");