Tag Info

New answers tagged

0

This seems to work for me... required a bit of modification and usage of the update() statement is required when modifying item properties: var clientContext, oWebsite, oList, itemCreateInfo, newItm, ctTypes; clientContext = new SP.ClientContext.get_current(); oWebsite = clientContext.get_web(); oList = ...


0

You can do something like this, ListItem listItem = myGroupList.Items.FindByValue("def_group"); if (listItem != null) { listItem.Selected = true; }; You can modify it to pass a variable in first line, in place of "def_group".


0

The came from the loop after loaded items. I changed by a classic loop and now it's working function OnSuccessLoadItem(){ for(var cpt=0;cpt<items.length;cpt++){ alert("success="+items[cpt].get_item(vf[1])); } }


0

If error is about Include try replacing context.load(item, "Include(Title)") with context.load(item, 'Include(Title)')


0

Try this var context = SP.ClientContext.get_current(); var web = context.get_web(); var items = []; var lists = web.get_lists(); var listId = SP.ListOperation.Selection.getSelectedList(); var list = lists.getById(listId); for (var i in selectedItems) { var id = selectedItems[i].id; var item = list.getItemById(id); items.push(item); ...


0

I recommend creating custom workflow using SharePoint Designer. In the workflow, use the "Copy List Item" action to copy the item. Blog article containing full step-by-step instructions can be found here.



Top 50 recent answers are included