Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

List item deletion issue

$
0
0

Hi,

Below is the code that I am using to delete list item from a list

 var siteUrl = '/sites/testlink';
 var taskId = GetUrlKeyValue("TaskID",false,location.href);
 var context = new SP.ClientContext.get_current();        
 var web = context.get_web();
 var list = web.get_lists().getByTitle('Announcements');
 this.oListItem = list.getItemById(taskId);
 oListItem.Delete();
 oListItem.update();

Its not deleting the item.Also it showing a web page error : Object doesnt support this property.

I have used like oListItem.delete(); Its asking for some parameter. I have added taskID but its not solving the issue. Please help.

Many thanks


Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>