Email: info@zenconix.com

Get selected element Id from Task List



Visit Site:

Overview

“Very BAD practices !!!” 

Sometimes situation comes that you don’t have any other options but you have to work on it and get work done.

If this situation comes then you are just searching for any possible solution (many times you know that it is wrong approch to do so…). 

I have come across the situation, wherein I wants to have Id of the ListItem from task list in client side scripting (JQuery).

Following is the code to get id of the ListItem of Task List.

[code language=”css”]
$(document).on("click", "#idHomePageEditItem", function () {
$("#Hero-WPQ2").next().next().next().children("tbody").children().each(function () {
if ($(this).hasClass("s4-itm-selected")) {
var selectedRecordId = $(this).children().eq(1).children().children().children().children().attr("liid");
alert(selectedRecordId );
}
}
}
[/code]

SelectItemFromTasklist

Features

Specifications

Preview