15,900,378 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Karthick_RR (Top 5 by date)
Karthick_RR
8-May-19 6:06am
View
view more
Karthick_RR
8-May-19 6:05am
View
view more
//ExecuteOrDelayUntilScriptLoaded(myFunction, "sp.js");
$(window).load(function(){
alert($("table.ms-listviewtable tr.ms-itmhover").length)
$("table.ms-listviewtable tr.ms-itmhover").each(function(){
var Itemrow = $(this).find("td:nth-child(4)")
});
});
Karthick_RR
8-May-19 6:04am
View
view more
//ExecuteOrDelayUntilScriptLoaded(myFunction, "sp.js");
$(window).load(function(){
alert($("table.ms-listviewtable tr.ms-itmhover").length)
$("table.ms-listviewtable tr.ms-itmhover").each(function(){
var Itemrow = $(this).find("td:nth-child(4)")
});
});
Karthick_RR
8-May-19 5:34am
View
Deleted
view more
//ExecuteOrDelayUntilScriptLoaded(myFunction, "sp.js");
$(window).load(function(){
alert($("table.ms-listviewtable tr.ms-itmhover").length)
$("table.ms-listviewtable tr.ms-itmhover").each(function(){
var Itemrow = $(this).find("td:nth-child(4)")
});
});
Karthick_RR
30-Apr-19 3:32am
View
var itemStatus ;
function clickMethod() {
var ctx = SP.ClientContext.get_current();
var items = SP.ListOperation.Selection.getSelectedItems(ctx);
var myItems = '';
var i;
for (i in items) {
myItems = items[i].id;
}
//Fetching selected item based on ID
RetrieveListItem(myItems)
}// End of Click method
function RetrieveListItem(itemids)
{
var _ctx = new SP.ClientContext.get_current();
var _List = _ctx.get_web().get_lists().getByTitle("LTI Ticket Incident"); // Enter List name
var _camlQuery = new SP.CamlQuery();
_camlQuery.set_viewXml("'<View><Query><Where><Eq><FieldRef Name=\'ID\'/><Value Type=\'Number\'>"+itemids+"</Value></Eq></Where></Query></View>'");
this._ItemColl = _List.getItems(_camlQuery);
_ctx.load(_ItemColl);
_ctx.executeQueryAsync
(
Function.createDelegate(this, this.onRetrieveQuerySuccess),
Function.createDelegate(this, this.onRetrieveQueryFailed)
);
}
function onRetrieveQuerySuccess(sender, args)
{
var _ListItemEnumerator = _ItemColl.getEnumerator();
while (_ListItemEnumerator.moveNext())
{
var _ListItem = _ListItemEnumerator.get_current();
var updateitemid = _ListItem.get_id(); // Saving item ID to variable
itemStatus = _ListItem.get_item('Status') // Update column
// Validating column
if (itemStatus == 'Assigned')
{
var _ctx1 = new SP.ClientContext.get_current();
var _List1 = _ctx1.get_web().get_lists().getByTitle("LTI Ticket Incident"); // Enter List name
this._ListItem1 = _List1.getItemById(updateitemid);
_ListItem1.set_item('Status', 'Pending'); // Pass column and value to update column
_ListItem1.update();// updateing item to list
_ctx1.load(_ListItem1);
_ctx1.executeQueryAsync
(
Function.createDelegate(this, this.onUpdatedQuerySuccess),
Function.createDelegate(this, this.onUpdatedQueryFailed)
);
}
else
{alert("Not assigned")}
}
//alert(_ListItemInfo.toString());
}
function onRetrieveQueryFailed(sender, args)
{
alert('Request failed. ' + args.get_message() +'\n' + args.get_stackTrace());
}
function onUpdatedQuerySuccess()
{
alert('Item status updated'); // Update column successful
}
function onUpdatedQueryFailed(sender, args)
{
alert('Request failed. ' + args.get_message() +'\n' + args.get_stackTrace());
}