I open a list item for editing and want to execute some JavaScript for this but I can't retrieve the item Id in the Edit form.
I use following code:
var context = SP.ClientContext.get_current();
var items = SP.ListOperation.Selection.getSelectedItems(context);
But the items collection is empty. On "View all" List form this code works well. The problem exists only in the EditForm. Can anyone help me?