Email: info@zenconix.com

Get selected element Id from Task List

Published on: 03/27/15 11:40 AM

Category:Javascript JQuery SharePoint 2013 Tags: , ,

“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


Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Gets a username from SharePoint’s User profile service

Here is script of “How to get username from user id from Active directory”   [code language=”css”] // get user name from id function getUserFromId(userid) { // var userid = _spPageContextInfo.userId; var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/getuserbyid(" + userid + ")"; var requestHeaders = { "accept": "application/json;odata=verbose" }; $.ajax({ url: requestUri, async: false, contentType: "application/json;odata=verbose", […]

Get the User ID of Active Directory name in SharePoint by Javascript

How to get User Id from Site User if you have User’s active directory name [code language=”css”] //Get the id of user from AD name. function getADNameId(adName) { var UserData; $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/SiteUsers?$Select=Id,Title&$filter=Title eq ‘" + adName + "’", type: "GET", async: false, headers: { "accept": "application/json;odata=verbose", "content-type": "application/json;odata=verbose" }, success: function (data) { […]

This form can not be rendered.

I am working with Workflow in SharePoint 2013, I got unexpected error today while creating association form. Error was, Solution: After searching it on internet I got to know that “State Services” was not started. So I have started it from central admin .   And now forms are rendering